Block Requests With Keywords in Query String

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 4
Joined: 03 Apr 2013, 11:47

Block Requests With Keywords in Query String

03 Apr 2013, 11:49

How can I block requests with certain keywords in the query string.

i.e. lolita, model, girl etc...

Query_String
pid=12263&pid=12263&sourcingName=Qxcfljaw&sourcingEmail=thebest%40hotmail.com&sourcingPhone=76513817313&sourcingQty=87&sourcingComments=What's+the+last+date+I+can+post+this+to++to+arrive+in+time+for+Christmas%3F+http%3A%2F%2Flsmagazinexl.kazeo.com+lolita+model+dads+girl++Wonder+what+was+wrong+with+the+original+sounds+so+they+had+to+replace+them+with+these+obviously+and++ridiculously+fake+ones.%0A+

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Block Requests With Keywords in Query String

03 Apr 2013, 17:40

Hello,

Try using something like:

Code: Select all
RewriteEngine on
RewriteBase /

RewriteCond %{QUERY_STRING} (?:girl|lolita|model) [NC]
RewriteRule .* - [F]


Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 15 guests