![]()
Someone had recently hotlinked to an image I'd posted here which was using a decent amount of bandwidth. Having never run into this before, I decided to nip it with the following .htaccess file (which resides in the root of my web directory):
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://([-a-z0-9]+\.)?(348north|bloglines|google)\.com [NC]
RewriteRule \.(gif|jpe?g|png)$ - [F,NC,L]
This is a small variation on the code described in this tutorial. What it says is to allow requests on gif, jpeg, jpg, and png files from the 348north, google, and bloglines domains.