Hi All,
I've been fiddling with this on and off for a few days and haven't found a
solution. I have a directory that is being hammered by referrer spam.
I've mitigated that largely with a fancy redirect if the referrer matches a
list of known spam domains.
HOWEVER, it doesn't catch unknown spam domains. I have noticed these
spineless losers generally use the "HEAD" method to make their requests -
fills my logs and is only a very small bandwidth penalty for them. So I
want to slow them down by restricting it GET requests only.
So, I'd like to restrict the directory (and all subdirectories) to "GET"
requests only, everything else should get a 403.
I've tried:
<Directory "/var/www/...../foo">
<Limit HEAD>
Order allow,deny
Deny from All
</Limit>
</Directory>
....and similar using,
<LimitExcept GET>
Order deny,allow
Deny from All
</LimitExcept>
...and other combinations of the two. So far, no joy.
I've managed to get a 403 response for any/all requests, or a 200 response
for any/all requests, but not a HEAD=403, GET=200.
Any ideas??
Cheers,
James
--
O Batman pegou seu bat-sapato social e seu bat-blazer. Onde ele foi?
A um Bat-zado
>> Stay informed about: Restrict a directory to specific methods?