[thelist] mod rewrite

Brady Mitchell mydarb at gmail.com
Tue Sep 18 15:25:50 CDT 2007


> 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

[R=301,L] does two things:

1 R=301 -- redirects the user to the new URL instead of displaying the
content at the URL the user entered

2 - L - Tells the rewrite engine not to apply any other rules to this URL

Try removing the L from your rule and see if it does what you're
looking for. The only problem I see with your second rule is that it's
not being applied due to the L in your flag list.

> Press_Release/topic/Data.php
>
> This is not working:
>
> RewriteCond %{QUERY_STRING} ^topic\=(.*)$
> RewriteRule ^$ /topic/%1.php [R=301,L]

HTH,

Brady



More information about the thelist mailing list