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.
I really don’t know why with all the free hosting places and such on the Internet people continue to hotlink. But yeah, stealing a photo of Devon is just super weird.
That’s always the risk of putting it on the Internet, and why I stamped Sample on it. Maybe I’ll replace all of them with pictures of a stuffed animal.