hotlinking posts

TMCom: Image Hotlinking

I’ve had a site pulling one particular image from my site. It gives no referrer and the user agent “Mozilla/4.0 (compatible; MSIE 6.0)”. It has the IP I wasn’t sure what it was at first, and figured it might just go away. But it hasn’t and is asking for the image a few times a day, 93718 bytes each request. Not a huge bandwidth pull, but annoying.

The image is a picture of an album cover for a site that I had built for the band I was once in, The Yars. The site is being “syndicated” on my site for portfolio purposes.

I finally tracked down the site that is pulling the image: (multiple sites are hosted from that IP). I’m not totally sure what the site is about, but it really had nothing related to the yars, other than that an empty image box (can’t see it, but it still seems to pull from my server) and the phrase “Yars CD Release” will show up with a search for “Yars”. Clicking on the image goes to, which pulls the image from my site as well, but sends the IP and other info from the visitor, not the host.

This doesn’t seem that important to me, so I decided to prevent mpcodex from pulling the image. I know that I could do something more advanced to prevent hotlinking in general, but that hasn’t been a problem yet and I don’t want to worry about missing image search engines. I’m just blocking that IP from that particular image using my .htaccess file with mod_rewrite:

# block
RewriteCond %{REMOTE_ADDR}
RewriteRule ^portfolio/siteRepository/yars/images/general/2.jpg$ - [F]

This took me much longer to set up than it should have, partly because my test server (my iBook) and my production server seemed to be handling things differently. I could have just used a “Deny” rule to block the IP altogether, and probably would be fine since it’s undoubtedly just a web host that would not have human visitors anyway, but I’d rather be safe for now.

I’ll watch this to make sure it actually works and that I don’t have any more problems. If I do, I’ll figure out what to do then.