« IE7 always keep a cache of the visited pages | Main

Blocking unwanted referrers

Home » Programming » Mod_rewrite

Looks like my post to avoid linking to hot images is not working, now i'm getting 85% bandwidth usage on my website. When i try to view the logs got numerous referrers from profiles.myspace.com. Alright, i have decided to block all traffic from myspace, will do it using .htaccess.

RewriteCond %{HTTP_USER_AGENT} QihooBot [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?profile.myspace.com.*$ [NC]
RewriteRule ^.* - [F]

Now, there is a bot that i have found so i added it anyway. :D If you wish to block some more add an or on the [NC] directive like this [NC,OR].

TrackBack

TrackBack URL for this entry:
http://www.tildemark.com/cgi-bin/mt/mt-tb.cgi/75

Comments (2)


Is it applicable to the blogs with a free hosted domain, like what I am using right now? If so, where do I put the codes (exact location) ?

Thanks,
Mitch

sorry its not applicable to your current blog host.

About

This page contains a single entry from the blog posted on April 19, 2007 8:05 AM .

The previous post in this blog was IE7 always keep a cache of the visited pages .

Many more can be found on the main index page or by looking through the archives .

Creative Commons License
This weblog is licensed under a Creative Commons License .
Powered by
Movable Type 3.33