Stop hotlinking / bandwidth theives

Hey all, just a quick update as I am waiting for Sky to get my new broadband up and running. Found out that a Blogger user was hot linking to a friends copyrighted pictures on their site. Normally my friend does not mind, but they were using it in a way he did not like. Anyway while he is chasing Google to get the site reported, he has asked if there was a way to prevent them linking?

Well yes there is, a quick .htaccess script in his media directory can stop the offend site (in this case any blogspot site) from showing his images and instead show a copyright image.

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?blogspot\. [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ [L]

Using the above .htaccess not only stops the offending site from showing the images but also reduces the bandwidth that would be consumed by visitors of the site.


Anyway that is all for now, take care!