Thread:Manual talk:Short URL/Apache/Redirect long urls

How do I redirect queries like  to , like what Wikipedia does? I currently have  in .htaccess and I use Apache. Thanks.