Web Hosting Talk







View Full Version : HotLinking Restriction


astralexis
01-07-2002, 08:51 AM
As I mentioned in this other thread (http://webhostingtalk.com/showthread.php?threadid=16954) I've put my personal site on the 0catch.com (http://www.0catch.com) server, because it's free and they let me put my own domain :) ....

Well, it turned out to be not exactly perfect, because of a restriction they implemented to prevent what they call "hotlinking", meant to prevent linking to images from outside the site.

A reasonable idea I must say. But the way it's implemented prevents also the default files index.html or index.htm from being loaded if not exactly identified in the URL, not on the site root but in subdirectories.

That is, a link to mysite.com works fine, but a link to mysite.com/myfolder throws a hotlinking error; to avoid this I have to link to mysite.com/myfolder/index.html. Interestingly, if the link mysite.com/myfolder is directly typed in the browser URL field, it loads. The same if the HTML file containing the link is on my local machine. But if I put it on another server on internet, that's when it throws the error.

So, it looks like I'm not going to stay with 0catch.com, unfortunately... :(

GeorgeC
01-07-2002, 08:59 AM
if the link mysite.com/myfolder is directly typed in the browser URL field, it loads. The same if the HTML file containing the link is on my local machine. But if I put it on another server on internet, that's when it throws the error.

That's due to the way .htaccess works. It checks for the referral to validate whether it's from the allowed source. When you directly type the URL in or call it from your local hard drive, no referral information is returned, so no disabling occurs.

At least that's my understanding of it.

The Laughing Cow
01-07-2002, 09:43 AM
ot: wow i see someone from dynamic drive. i think u guys rock!!

GeorgeC
01-07-2002, 07:53 PM
Originally posted by The Laughing Cow
ot: wow i see someone from dynamic drive. i think u guys rock!!

Well thank you :) Just for the record we do not provide hosting ;)