I'm editing a .htaccess file for redirection from www.oldwebsite.com to www.newwebsite.com + specific redirection for pages.
the following code is working good :
RedirectPermanent /page.html http://www.newwebsite.com/newpage.html
Where I got problem is when I try to redirect pages ending like this with redirectpermanent :
oldpage.php?id=1
At this point I get a 404 error back.
I tried another solution that is this code
RewriteCond %{QUERY_STRING} ^id=1$
RewriteRule ^oldpage\.php$ http://www.newwebsite.com/newpage2.html [R=301,L]
This is working excepted the browser makes me go to the following link :
http://www.newwebsite.com/newpage2.html?id=1
Can someone help me with this issue. I would like to use Redirect permanent (doesnt work, same thing with Redirect seeother). I think solution is easy but I don't get a detail I think.
Thanks !!!
olpageinstead ofoldpage.