I'm trying to write a .htaccess rule that would redirect someone asking for
http://mysite.com/questions/123/my-question-name
to
http://mysite.com/questions/question_handler.php?qid=123
Here's what i wrote so far (it's not working):
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?(.*)$ [NC] RewriteRule ^(.*)/questions/(d+)/(.*)$ http://%1/questions/question_handler.php?qid=%2$1 [R=301,L]
Any help is much appreciated.
See Question&Answers more detail:os