Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
forbid access to a particular query via htaccess
Yesterday I got over 4000 hits for /?rss=1&ru
which it does not exist. The hits are still coming from various IPs. Could someone suggest an htaccess rule to forbid access to the particular url?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: forbid access to a particular query via htaccess
According to this answer on SO, you could do something like this:
RewriteCond %{THE_REQUEST} \s/+[^?]*\?rss=1&ru
RewriteRule ^ - [F,L]
(I’m not sure if you have to escape ampersands on .htaccess, but a priori, I’d say you don’t have).
Offline
Re: forbid access to a particular query via htaccess
There is also this solution:
RewriteCond %{QUERY_STRING} \brss=1&ru\b [NC]
RewriteRule ^ - [F]
Offline
Re: forbid access to a particular query via htaccess
Thanks so much Julián
Hmmm none works. I had a similar problem before. It seems that the server ignores the {QUERY_STRING}
in the htaccess. I will write to them and I’ll come back here.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline