Dec 18 2005
Block Hotlinking with .htaccess
Here’s something that I’ve just added to one of my sites, www.gogosuperfun.com, that some folks may find useful. It’s intended to stop people from hotlinking images and thus stealing your bandwidth.
Basically, it just blocks any domain, other than your own, from accessing filetypes that you specify.
mod_rewrite code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ […]