Skip to content

Instantly share code, notes, and snippets.

@unix7
Created February 9, 2012 09:30
Show Gist options
  • Save unix7/1778736 to your computer and use it in GitHub Desktop.
Save unix7/1778736 to your computer and use it in GitHub Desktop.
.htaccess - Prevent Bot Attack
# Bot Blocker
<IfModule mod_setenvif.c>
SetEnvIfNoCase User-Agent ^$ keep_out
SetEnvIfNoCase User-Agent (pycurl|casper|cmsworldmap|diavol|dotbot) keep_out
SetEnvIfNoCase User-Agent (flicky|ia_archiver|jakarta|kmccrew) keep_out
SetEnvIfNoCase User-Agent (purebot|comodo|feedfinder|planetwork) keep_out
<Limit GET POST PUT>
Order Allow,Deny
Allow from all
Deny from env=keep_out
</Limit>
</IfModule>
//Source: http://wp.tutsplus.com/tutorials/secure-your-wordpress-against-user-agents-and-bots/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment