>________________________________
>From: Yehuda Katz <yehuda@xxxxxxxxxx>
>To: users@xxxxxxxxxxxxxxxx; Leonardo M. Ramé <martinrame@xxxxxxxxx>
>Sent: Saturday, October 29, 2011 11:44 PM
>Subject: Re: Blocking referer problem
Hi, after replacing the rule by your suggestion, I stopped checking my error logs, until today. It seems the rule is not blocking the referers I need to.>
>
>2011/10/29 Leonardo M. Ramé <martinrame@xxxxxxxxx>
>
>
>>Knowing this, I found by googling, that I can block referers by adding this to my .htaccess file:
>>
>>RewriteEngine on
>>RewriteCond %{HTTP_REFERER} st\.ac\.th [NC,OR]
>>RewriteCond %{HTTP_REFERER} clubmedia-ent\.com [NC,OR]
>>RewriteCond %{HTTP_REFERER} multidicona\.com [NC]
>>RewriteRule ^ - [F]
>>
>>
>Your RewriteRule does not match any requests. Try
>RewriteRule .* - [F]
>
>After changing it, I did a "apachectl restart".
>>
>You do not need to restart after changing the htaccess.
>
This is an extract of the site-error_log of one site:
[Sat Nov 05 21:11:05 2011] [error] [client 176.14.112.166] File does not exist: /usr/local/www/apache22/data/site/gallery2, referer: http://clubmedia-ent.com/film/contact.html
[Sat Nov 05 22:46:37 2011] [error] [client 95.27.181.153] File does not exist: /usr/local/www/apache22/data/site/gallery2, referer: http://multidicona.com/
[Sun Nov 06 12:07:29 2011] [error] [client 95.26.196.133] File does not exist: /usr/local/www/apache22/data/site/gallery2, referer: http://multidicona.com/
[Sun Nov 06 12:07:53 2011] [error] [client 95.25.98.97] File does not exist: /usr/local/www/apache22/data/site/gallery2, referer: http://www.multidicona.com/electronica.html
I want to get rid of the attacks from "clubmedia-ent.com" and "www.multidicona.com", how can I block these?.
This is the .htaccess for the site:
RewriteRule .* - [F]
RewriteEngine on
RewriteCond %{HTTP_REFERER} st\.ac\.th [NC,OR]
RewriteCond %{HTTP_REFERER} clubmedia-ent\.com [NC,OR]
RewriteCond %{HTTP_REFERER} multidicona\.com [NC]