Forced by the number of hits at the Dilbert pictures, I have taken the first counter measures against hotlinking. It isn't' possible anymore to link a picture from an external website without risking that a fair share of the viewers don't get to see the right picture.

The counter measures are not completely effective, but work quite nice and are described here.

Page's like this one or this one show the first results.

Juli 05 2005
Small adjustements, in stead of blocking everything, I now have blocked just the url's that deliver the pictures from the cartoons (Dilbert, Fifthwave, Dirkjan, Fokke en Sukke, Splinter and Userfriendly). All other pictures are still available. I have reversed the rules a little and searched for the url's to block. Doing this I also found a typo in the website where I found this:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com [NC,OR]
RewriteCond %{HTTP_REFERER} !^http://yoursite.com [NC]
RewriteRule [^/]+.(gif|jpg)$ - [NC,F,L]

The [NC,OR] has to be just [NC] , the variabele HTTP_REFERER is aways unequal the first or the second value, the purpose is to test wether it is unequal the first value AND unequal the second value. So this should be right:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com [NC]
RewriteCond %{HTTP_REFERER} !^http://yoursite.com [NC]
RewriteRule [^/]+.(gif|jpg)$ - [NC,F,L]


For me this sort of is the complete package:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com [NC]
RewriteCond %{HTTP_REFERER} !^http://yoursite.com [NC]
RewriteCond %{REQUEST_URI} ^/images/dilbert* [NC,OR]
RewriteCond %{REQUEST_URI} ^/images/splinter* [NC]
RewriteCond %{REQUEST_URI} !^/hotlink.jpg [NC]
RewriteRule [^/]+.(gif|jpg)$ http://www.yoursite.com/hotlink.jpg [NC,R,L]

This boiles down to:
- if HTTP_REFERER doesn't match one of the two websites
- if the asked url begins with one of the two named parts
- if you're not asking for the picture hotlink.jpg
- then you'll get the picture hotlink.jpg