hankknight
asked on
mod_rewrite: redirect specific get query
Using .htaccess and mod_rewrite I want to redirect this:
http://example.com/index.php?option=com_sitemap&view=xml
To this:
http://example.com/sitemap.xml [L,R=301]
My code below does NOT work:
http://example.com/index.php?option=com_sitemap&view=xml
To this:
http://example.com/sitemap.xml [L,R=301]
My code below does NOT work:
RewriteRule ^index.php?option=com_sitemap&view=xml http://example.com/sitemap.xml [L,R=301]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
RewriteRule "^/index.php.*" site.xml [L,R=301]