Image hotlinking bad!

I have avoided blocking image hot linking for a long time as I didn’t ever think it would be necessary. However it seems users of the wonderful myspace.com have taken a liking to some of my images and started hot linking them from their pages. As such I have decided to block hot linking of my images using a simple set of Apache rewrite rules in the .htaccess file for this site.

RewriteEngine On
RewriteCond %{HTTP_REFERER} !=""
RewriteCond %{HTTP_REFERER} "!^http://blog.ftwr.co.uk/.*$" [NC]
RewriteCond %{REQUEST_URI} "\.(jpg|gif|png)$"
RewriteRule .* - [F]

These rules come straight from the wonderful Apache Cookbookby Ken Coar and Rich Bowen.

Please let me know if you notice that this has broken any of the images on this site!.

2 thoughts on “Image hotlinking bad!

  1. Image hot linking is nasty. I have had people do that to me too. Sure eats up the bandwith. Not anymore though, because I did the same thing you did. Learning about .htaccess was a little complicated but by far one of the best things I did. I feel sorry for people who aren’t on apache servers. I do not know of anyway they can stop hotlinking. It is becoming a huge crime. You were smart to block it.

  2. Pingback: Peter Westwood » Stealing content for profit.

Comments are closed.