.htaccess question

i can’t find a tutorial that seems to answer what i need.

how can i prevent hotlinking from ALL of mysite.com with an EXCEPTION of a single folder and it’s subfolders?

.htaccess works on a folder plus its subfolders. I don’t know how to disable for a single directory, but you could, create a .htaccess file for one folder then copy that file and paste into any other folder that needs protecting. disabling hotlinking can be done in your control panel, just specify what directory you want to protect, what extentions are to be blocked and what domains have permission to access those extentions.
In your control panel, click on goodies, then htaccess/webdav, click on the domain or subdomain you want to protect if you have more than one, then fill in the blanks.

My website

thanks silk, i appreciate the input.

my main goal is to prevent having to update each individual directory should i need to change the .htacess file.

would creating a symbolic link in each directory work?

.htaccess supports inheritance. Use one that restricts everybody’s access at the top level. Then make a new one allowing hotlink access in the appropriate subdirectory.

From http://docweb.cns.ufl.edu/docs/d0123/d0123.html#id2696016

[quote]Inheritance of Restrictions
Your .htaccess file and its corresponding username/password file (if any) restrict access to the subdirectory in which .htaccess is located, and all subdirectories below it. This inheritance can be over-ridden by placing another .htaccess file in one of the subsidiary subdirectories, in which case the restrictions imposed by each .htaccess file apply to the directory in which it is located and are inherited downward from that point.[/quote]

BC Tech
Team Shocker

excellent pangea! that will work perfectly :slight_smile:

my respect to all posters. wasn’t trying to jack the thread, and see they were on point. i just wrote my post in a text editor and posted without reviewing the others up til that point.

BC Tech
Team Shocker