RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} rogerbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} bingbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} exabot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} dotbot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} gigabot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} AhrefsBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Baiduspider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Discobot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} EdisterBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} HuaweiSymantecSpider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} JikeSpider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Magpie-Crawler [NC,OR]
RewriteCond %{HTTP_USER_AGENT} MJ12bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} SISTRIX [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Sogou [NC,OR]
RewriteCond %{HTTP_USER_AGENT} Sosospider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} TurnitinBot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} YandexBot [NC]
RewriteRule ^.* - [F,L]
SetEnvIfNoCase User-Agent ^$ bad_bot #this is for blank user-agents
SetEnvIfNoCase User-Agent "^Jakarta" bad_bot
SetEnvIfNoCase User-Agent "^User-Agent" bad_bot
SetEnvIfNoCase User-Agent "^libwww," bad_bot
SetEnvIfNoCase User-Agent "^lwp-trivial" bad_bot
SetEnvIfNoCase User-Agent "^Snoopy" bad_bot
SetEnvIfNoCase User-Agent "^PHPCrawl" bad_bot
SetEnvIfNoCase User-Agent "^WEP Search" bad_bot
SetEnvIfNoCase User-Agent "^Missigua Locator" bad_bot
SetEnvIfNoCase User-Agent "^ISC Systems iRc" bad_bot
SetEnvIfNoCase User-Agent "^lwp-trivial" bad_bot
SetEnvIfNoCase User-Agent "^rogerbot" bad_bot
SetEnvIfNoCase User-Agent "^bingbot" bad_bot
SetEnvIfNoCase User-Agent "^exabot" bad_bot
SetEnvIfNoCase User-Agent "^dotbot" bad_bot
SetEnvIfNoCase User-Agent "^gigabot" bad_bot
SetEnvIfNoCase User-Agent "^AhrefsBot" bad_bot
SetEnvIfNoCase User-Agent "^Baiduspider" bad_bot
SetEnvIfNoCase User-Agent "^Discobot" bad_bot
SetEnvIfNoCase User-Agent "^EdisterBot" bad_bot
SetEnvIfNoCase User-Agent "^HuaweiSymantecSpider" bad_bot
SetEnvIfNoCase User-Agent "^Magpie-Crawler" bad_bot
SetEnvIfNoCase User-Agent "^MJ12bot" bad_bot
SetEnvIfNoCase User-Agent "^SISTRIX" bad_bot
SetEnvIfNoCase User-Agent "^Sogou" bad_bot
SetEnvIfNoCase User-Agent "^Sosospider" bad_bot
SetEnvIfNoCase User-Agent "^TurnitinBot" bad_bot
SetEnvIfNoCase User-Agent "^YandexBot" bad_bot
SetEnvIfNoCase User-Agent "^JikeSpider" bad_bot
<Limit GET POST HEAD>
Order Allow,Deny
Allow from all
Deny from env=bad_bot