Micro-entry: Stop hotlinking

datePosted 1:34 PM, October 28th, 2010 by MarkleB

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]

This now displays the following graphic:

For some reason, this makes me very happy.

categoryPosted in Miscellaneous
Related Posts:

2 Responses to “Micro-entry: Stop hotlinking”

  1. Cyndy Otty on November 2nd, 2010 at 7:31 AM

    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.

    • MarkleB on November 2nd, 2010 at 12:00 PM

      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.

Leave a Reply

Name: (required)
Email: (required) (will not be published)