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)$ http://your-domain.com/copyright-notice.jpg [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!

Leave a Reply

Your email address will not be published. Required fields are marked *

8j2P62

Please type the text above:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>