apache - htaccess block requests by querystring -
there way block requests querystring?
i should block request have "?userid=1234" or "&userid=1234"
for example:
/directory/page.php?userid=1234&var2=abc&var3=.. /directory/page.php?var1=test&userid=1234&var2=abc&var3=..
the directory , page same.
i know it's possibile, i'm not sure how..
you can check query_string
, test if contains userid=1234
.
if so, forbid it
rewriteengine on rewritecond %{query_string} \buserid=1234\b [nc] rewriterule ^ - [f]
Comments
Post a Comment