I have a problem with an 301 redirection with get parameters.
My old website had URL like this :
http://www.mywebsite.com/contacts/?lang=fr
I upload my new website today. And for the seo i would like to redirect this address to the new : http://www.mywebsite.com/contact
I use this redirection in my htaccess but it doesn’t work ….
RewriteCond %{QUERY_STRING} ^lang=fr$ RewriteRule ^contacts$ http://www.mywebsite.com/contact [L,R=301]
What’s wrong ?
Thanks a lot 🙂
4
Answers
Thanks a lot, it works ! But ... At the same time I would like to te the same redirection with another pages : http://www.mywebsite.com/photos/?lang=fr redirect to http://www.mywebsite.com/gallery
How to to make it works ? Thanks
Use below rule,
Try like this, your .htaccess:
Try this: