Sometimes you want to redirect the user to a new page based on a specific query string value. Heres  how to do that:
RewriteCond %{QUERY_STRING} foo=bar&bim=bam
RewriteRule ^horrible.php$ /farbetter.html? [R=302]
This redirects all traffic going to “horrible.php?foo=bar&bim=bam” to goto “farbetter.html”. Note that for all other querystring vars horrible.php is still available.
Category: Apache
|
