A way to not allow a site to Hotlink.

A way to not allow a site to Hotlink.

Posted by: DeathGoth
Posted on: 2006-12-15 00:08:00

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

Re: A way to not allow a site to Hotlink.

Posted by: snewpers
Posted on: 2006-12-15 00:29:00

hi

bandwidth theft sucks!

try this, it'll work!

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

Re: A way to not allow a site to Hotlink.

Posted by: silkrooster
Posted on: 2006-12-15 00:37:00

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

Re: A way to not allow a site to Hotlink.

Posted by: scjessey
Posted on: 2006-12-15 04:48:00

The DreamHost Wiki is your friend!

Re: A way to not allow a site to Hotlink.

Posted by: Tor
Posted on: 2006-12-15 07:45:00

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

Tags: hotlinki am wonderinghotlinkingimages