my site is under a botnet attack with multiple IP addresses; the attack consuming bandwidth. I've created this entry in .htaccess but seems does nothing:
RewriteEngine on
RewriteCond %{REQUEST_URI} /index\.php [NC]
RewriteCond %{HTTP_REFERER} mysite\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} mysite\.com/index\.php [NC]
RewriteCond %{HTTP_USER_AGENT} Mozilla/5\.0\ \(Macintosh;\ Intel\ Mac\ OS\ X\ 10_7_5\)\ AppleWebKit/537\.36\ \(KHTML,\ like\ Gecko\)\ Chrome/27\.0\.1453\.116\ Safari/537\.36 [NC]
RewriteRule .* - [F,L]
I discovered that the attack using a huge number of IP addresses, but:
- Same REQUEST URI (/index.php)
- Two kind of REFERER (mysite.com and mysite.com/index.php)
- Same UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36
Seems that my code in .htaccess do not stop this attack; does someone can give some hints or improve/correct my code?
thx den