MOD Rewrite Rule: Watching For QUERY_STRING values
I'm trying to use mod_rewrite to watch for URL's that do not contain a
certain name value pair: "badname=". The rule I have is:
RewriteEngine On
RewriteCond %{QUERY_STRING} !^badname=(.*)$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [QSA]
So if the query string contains badname with any value (even badname=), I
don't want it to redirect. But it doesn't seem to be working. Any help
would be greatly appreciated.
No comments:
Post a Comment