Code Snippet </> Info
Snippet Name: Block Unwanted Referring Domain Traffic
Description: Block unwanted visitors based on the referring domain. You can also save bandwidth by blocking specific file types such as .jpg, .zip, .mp3, and .mpg from specific referring domains.
Note: Simply replace scumbag.com? and wormhole.com? with the offending domains of your choice. Add a RewriteCond for each offending domain added.
Author:
Last Modified: 2015-03-26 23:33:49
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!
# Block visitors referred from indicated domains
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} scumbag\.com [NC,OR]
RewriteCond %{HTTP_REFERER} wormhole\.com [NC,OR]
RewriteRule .* - [F]
</ifModule>
|