Forum Moderators: phranque
RewriteEngine on
RewriteRule ^list\.php\?letter=([a-z])$ http://www.example.com/abc/$1/ [NC,R=301,L]
I have no idea why it's not working, because I have used similar redirects on the same site without any problems. Maybe someone can spot something glaringly obvious that I have missed and put me out of my misery ;)
[edited by: jdMorgan at 10:27 pm (utc) on April 30, 2006]
[edit reason] Formatting & example.com [/edit]
For a full run-down on rewriting, see the threads in Apache forum section of the WebmasterWorld library [webmasterworld.com]. The "Changing dynamic to static URLs" post demonstrates how to rewrite a URL with a query string, as part of the main subject.
Jim
For the benefit of anyone else wanting to do something similar, the following works:
RewriteEngine on
# Redirect old URLs to new ones
RewriteCond %{QUERY_STRING} ^letter=([a-z])$
RewriteRule ^list.php$ http://www.example.com/abc/%1/? [NC,R=301,L]