I want to redirect
whorus.php?lang=en&id=99
into
about.php?lang=en&id=99
I want to keep the same query string [QSA]
I want to change the page ["whorus" -> "about"]
what should I use? Redirect? RewriteRule
I want to redirect
whorus.php?lang=en&id=99
into
about.php?lang=en&id=99
I want to keep the same query string [QSA]
I want to change the page ["whorus" -> "about"]
what should I use? Redirect? RewriteRule
If you want an internal rewrite then following will work:
RewriteEngine On
RewriteRule ^whorus\.php$ /about.php [L,NC,QSA]
If you want an external redirect (change the URL in the browser) then following will work with R
flag:
RewriteEngine On
RewriteRule ^whorus\.php$ /about.php [L,NC,QSA,R=301]
The query string should remain with something like this. This will perform a permanent 301 redirect.
RewriteRule whorus.php http://www.newsite.com/about.php [L,R=301]