Code Snippet </> Info
Snippet Name: Block Hitbots
Description: Block hitbots based on referring URL.
Note:
Author:
Last Modified: 2014-05-18 05:39:57
Language: .htaccess
Highlight Mode: html
|
Copy Codes: Use Free Notepad ++ |
|
Snap HTML Code Editor: Paste the source code, make changes and instantly see it in live preview. Snap HTML Code Editor
|
|
Copied To Clipboard!
# Begin Block Hitbot
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?www.badhitbot.com.*$ [NC]
RewriteRule .* - [F,L]
# // --> End
If you would like to redirect the hitbots to another folder or server, use the code below:
# Begin Block Hitbot & Redirect
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?www.badhitbot.com.*$ [NC]
RewriteRule .* http://yourdomain.com/bad-hitbots-folder/spank.php [R,L]
# // --> End
|