Disabling Hotlinked Images

I recently noticed some folks hotlinking to photos here on this site. Hotlinking is bad form, plus my bandwidth has been up a bit lately and this isn’t helping.

A quick search turned up this site which creates the mod_rewrite rules for you to either reject the hotlink request or (as I chose to do) redirect them to a different image.

Interestingly, I’m not sure that this works on images referenced from CSS. One person was using a photo as a background (they had it specified within their style tags on the page) and the rewrite rules didn’t seem to take effect. Perhaps it is sending an empty referrer? Post a comment if you’ve looked into this; I’ll check it out in more detail when I have time if no answers appear. 🙂