Micro-entry: Stop hotlinking

Going through my site’s stats the other day, I discovered that somebody had been hotlinking some of my images. I wouldn’t have minded all that much (I have unlimited bandwidth), except it was a picture of my son, and that was just creepy.

I’ve disabled their ability to do this by adding the following lines to the .htaccess file on my server:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?goodideaatthetime.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://www.goodideaatthetime.com/images/nohotlinking.jpg [NC,R,L]
</IfModule>

This now displays the following graphic:

For some reason, this makes me very happy.