[thelist] mod rewrite
Mark Joslyn
Mark.Joslyn at SolimarSystems.com
Tue Sep 18 13:52:27 CDT 2007
I am currently trying to solve an issue with old content (static) and new
content (dynamic).
My static pages are named like this:
Press_Release_Data.php
Press_Release_Search.php
Press_Release_Post.php
etc.
My new dynamic pages have this naming convention:
Press_Release.php?topic=Data
Press_Release.php?topic=Search
Press_Release.php?topic=Post
To not break my older links, I use a mod-rewite command like this:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^Press_Releases_(.*)\.php$ Press_Releases.php?topic=$1 [R=301,L]
This will work and it links to the new dynamic pages, but I want to
mod-rewrite this link again to achieve a URL similar to
Press_Release/topic/Data.php
This is not working:
RewriteCond %{QUERY_STRING} ^topic\=(.*)$
RewriteRule ^$ /topic/%1.php [R=301,L]
Any help would be appreciated.
Thanks,
markJ
More information about the thelist
mailing list