Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #redirect bad bots to one page
- RewriteEngine on
- RewriteCond %{HTTP_USER_AGENT} facebookexternalhit [NC,OR]
- RewriteCond %{HTTP_USER_AGENT} Twitterbot [NC,OR]
- RewriteCond %{HTTP_USER_AGENT} Baiduspider [NC,OR]
- RewriteCond %{HTTP_USER_AGENT} MetaURI [NC,OR]
- RewriteCond %{HTTP_USER_AGENT} mediawords [NC,OR]
- RewriteCond %{HTTP_USER_AGENT} FlipboardProxy [NC]
- RewriteCond %{REQUEST_URI} !\/nocrawler.htm
- RewriteRule .* http://yoursite/nocrawler.htm [L]
- OR
- #block bad bots with a 403
- SetEnvIfNoCase User-Agent "facebookexternalhit" bad_bot
- SetEnvIfNoCase User-Agent "Twitterbot" bad_bot
- SetEnvIfNoCase User-Agent "Baiduspider" bad_bot
- SetEnvIfNoCase User-Agent "MetaURI" bad_bot
- SetEnvIfNoCase User-Agent "mediawords" bad_bot
- SetEnvIfNoCase User-Agent "FlipboardProxy" bad_bot
- <Limit GET POST HEAD>
- Order Allow,Deny
- Allow from all
- Deny from env=bad_bot
- </Limit>
Advertisement
Add Comment
Please, Sign In to add comment