The following rewrite rules will allow you redirect of forbid traffic coming from a refferer you don't like. This can help with deflecting hitbot traffic, or traffic from sites that install trojans and exploits, so it doesn't skew your traffic statistics.
Keep in mind that if you use this on your sites, you should NOT redirect the traffic to a "pop-up hell" or some other trap. You will most likely be deflecting a lot of hitbots, but there will also be some real surfers in there who just got unlucky and came to you from a scumbag site. Don't abuse them more. If you're not going to just forbid the traffic, at least send them to a virus scanner or spybot page. You can actually help some people, and very possibly make a few extra dollars off them.
To redirect traffic to URL of your choice use this:
Code:
## Redirect Bad Domains
RewriteCond %{HTTP_REFERER} ^http://(www\.)?holyvoyeur\.com?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?bbwlands\.com?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?easytoons\.net?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?easygay\.net?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?teensoncock\.net?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?bestworldtop\.com?.*$ [NC]
RewriteRule ^.*$ http://www.REDIRECT-URL-HERE.com [R,L]
To give a forbidden error instead, change the last line to this:
Code:
RewriteRule ^.*$ - [F,L]
To add more, simply copy one of the entries already there, paste it back in, and edit the name. Be sure to watch the last line when editing. All lines have an [OR] in them EXCEPT the last one. Placing an OR statement there will break it.
The redirect/forbid will match the domain names with or without the WWW. prefix, and does not worry about letter case.
This will stop or redirect the bad traffic before any of your scripts see it, keeping your stats from becoming falsely inflated by bad or bot traffic.