Apache - How to redirect using qsa, Htaccess use QSA Query String Append
How to redirect using qsa
htaccess RewriteRule using QSA Query String Append
1) To replace a file with another file
http://www.w3calculator.com/index.php?col=red
with:
http://www.w3calculator.com/common.php?col=red
you can use [QSA] (Query String Append)
RewriteEngine On RewriteRule ^index.php$ http://xxx.com/common.php [R=301,QSA,L]
2) To redirect a specific value
RewriteEngine On RewriteCond %{QUERY_STRING} ^(red)$ RewriteRule ^index.php$ http://w3calculator.com/common.php?%1 [R=301,L]
3) To redirect a group of values
RewriteEngine On RewriteCond %{QUERY_STRING} ^(red|blue)$ RewriteRule ^index.php$ http://w3calculator.com/common.php?%1 [R=301,L]If the argument is red or blue then the file will be redirected.
The topic on Apache - How to redirect using qsa is posted by - Venki
Hope you have enjoyed, Apache - How to redirect using qsaThanks for your time