Hey, I need to filter out requests with certain PHP value in HTACCESS and I cant find how to do that.
The problem is there is someone spamming my site with special PHP value and it keeps my server overloaded.
The URL is www.site.com/?q=XXXXX. I need to filter out all requests like this (with ?q=XXXX) and redirect them to homepage instead.
I tried this but it doesnt work properly (there is a loop).
RewriteCond %{QUERY_STRING} q=(.*)
RewriteRule ^(.*) http://www.site.com
Thanks