Reputation: 23
Hello this is my htaccess
RewriteEngine On
RewriteCond %{QUERY_STRING} page=philosophie
RewriteRule ^index\.php$ http://www.example.ch/buero.html [R=301,L]
I want to redirect
/index.php?page=geschaeftsleitung to /buero.html
but with my rule I get http://www.example.ch/buero.html?page=philosophie
How can I rewrite the rule so that I didn't get ?page=philosophie in the end of the new link?
Upvotes: 1
Views: 30
Reputation: 41219
Try :
RewriteEngine On
RewriteCond %{QUERY_STRING} page=philosophie
RewriteRule ^index\.php$ http://www.example.ch/buero.html? [R=301,L]
"?" at the end of the rewrite target removes the query string.
Upvotes: 1