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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -