A way to not allow a site to Hotlink


#1

I am wondering if there is any way to no allow a particular site to hotlink files from a server?

or maybe 2 or 3 sites… or 10 or 20… depending on how insane people wanna be…

Right now on my site I have had over 1000 hits on particular images that I would not like to have hotlinked…

Is there anyway to eliminate him from hotlinking?

http://www.studyof911.com


#2

hi

bandwidth theft sucks!

try this, it’ll work!

http://www.htmlbasix.com/disablehotlinking.shtml


#3

Try this in a .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourwebsite.com/.*$ [NC]
RewriteRule .(gif|jpg)$ [F]

This will block all referrers who do not match this rule(enter your website in place of yourwebsite.com). The rule then states any file extention ending with gif or jpg are forbidden.
The file is a plain text file named .htaccess if necessary name it a.htaccess upload to the directory you want blocked or your main domain folder if you want your entire site blocked. Rename a.htaccess to .htaccess. If your ftp program is set to not view hidden files the text file should disappear.
Silk

My website


#4

The DreamHost Wiki is your friend!


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#5

FYI, It is trivially easy to circumvent referer restrictions. For example:

https://addons.mozilla.org/search.php?q=referer&type=A&app=firefox

Isn’t technology great?!

tor.eff.org