How can I stop a bot attack on my site?

Posted by tnorthcutt on Pro Webmasters See other posts from Pro Webmasters or by tnorthcutt
Published on 2010-07-28T15:58:45Z Indexed on 2012/12/13 11:21 UTC
Read the original article Hit count: 242

Filed under:
|

I have a site (built with wordpress) that is currently under a bot attack (as best I can tell). A file is being requested over and over, and the referrer is (almost every time) turkyoutube.org/player/player.swf. The file being requested is deep within my theme files, and is always followed by "?v=" and a long string (i.e. r.php?v=Wby02FlVyms&title=izlesen.tk_Wby02FlVyms&toke).

I've tried setting an .htaccess rule for that referrer, which seems to work, except that now my 404 page is being loaded over and over, which is still using lots of bandwidth. Is there a way to create an .htaccess rule that requires no bandwidth usage on my part?

I also tried creating a robots.txt file, but the attack seems to be ignoring that.

#This is the relevant part of the .htaccess file:
RewriteCond %{HTTP_REFERER} turkyoutube\.org [NC]
RewriteRule .* - [F]

© Pro Webmasters or respective owner

Related posts about htaccess

Related posts about botattack