slight leak in the rule, adjusted with yourdomain\.com (thanks Swedguy)
RewriteEngine on
# leave this line in allow empty referrers, remove to disallow empty referrers
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !^
http://(.*@)?([a-z0-9-]+\.)*yourdomain\.com(:[0-9]+)?(/.*)?$ [NC]
RewriteCond %{HTTP_REFERER} !^
http://(.*@)?1\.2\.3\.4(:[0-9]+)?(/.*)?$
RewriteRule .*\.(asf|mpg|mpeg|wmv|avi|rm|gif|jpeg|jpg|zip)$ - [NC,F,L]
In the last hour, its caught 14683 hotlink requests on one client's machine. Mostly fusker/usefulidiot, but, a few others that were surprising. hotmail, msngroups, a bunch of blogs, a few forums. Overall, it seems to be doing well -- negligable impact on the traffic on the machine though.