Old query String hard coded 301 url redirection using htaccess
- by Nilesh Toshniwal
I have recently changed CMS of my website and now looking to redirect old urls like:
oldpage.php?key=7cdb93c26
to some new urls but I want all of them in hard coded way and it should be a 301 redirect
I tried the following rules but none of them work for me
redirect 301 /oldpage.php?key=7cdb93c26 http://www.mynewsite.com/my-new-page.html
redirect 301 "/oldpage.php?key=7cdb93c26" http://www.mynewsite.com/my-new-page.html
RewriteRule ^oldpage.php?key=7cdb93c26$ http://www.mynewsite.com/my-new-page.html [L,R=301]
RewriteRule ^oldpage.php?key=7cdb93c26$ /my-new-page.html [L,R=301]