Web Hosting Talk







View Full Version : where should the htaccess be


dapproid
08-07-2002, 09:07 PM
Hello

I intend to use htaccess to prevent hotlinking but if i upload the file to root, it blocks the hole site. Where should i put it?



Thanks

Jo

elsmore1
08-07-2002, 09:20 PM
Originally posted by dapproid
Hello

I intend to use htaccess to prevent hotlinking but if i upload the file to root, it blocks the hole site. Where should i put it?

Thanks

Jo

Are you saying that you wish to prevent hot linking in some parts of the site and not others?

An .htaccess file sets configurations for the directory it is in, and all subdirectories of that directory which dont have overriding directives in their own .htaccess files, so you need to put the .htaccess file in the top level directory of each section of your site in which you wish to prevent hot linking.

It really sounds more like your directives to prevent hotlinking are wrong though, so you may wish to review them.

dapproid
08-07-2002, 09:25 PM
okidoki


thanks elsmore

chirpy
08-08-2002, 10:34 AM
There's also a handy page here that describes how to prevent hot linking using the ReWrite engince:

http://websiteowner.info/tutorials/server/bandwidththeft.asp