Forum Moderators: phranque
Problem: Dynamic query strings to static URL not working.
RewriteCond %{REQUEST_URI} index.php
RewriteRule .* http://www.example.com/ [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC,L]
RewriteCond %{SCRIPT_FILENAME}/ -d
RewriteCond %{SCRIPT_FILENAME}.php !-f
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.+)\.php$ /$1 [R=301,L]
RewriteCond %{SCRIPT_FILENAME}.php -f
RewriteRule [^/]$ %{REQUEST_URI}.php [QSA,L] I am sorry but don't see any change except putting them nicely with a line space between every condition.
RewriteCond %{QUERY_STRING} ^popular=$1
RewriteRule ^venue \.php$ /venue/%1? [R=301,L] RewriteCond %{REQUEST_URI} index.php
RewriteRule .* http://www.example.com/ [R=301,L] RewriteRule index\.php http://www.example.com/ [R=301,L]