.htaccess not effecting subdirectories

They have: 68 posts

Joined: Jun 2006

Hey,

I modified my .htaccess so that it has styling from a header and footer HTM docs. Only problem is, the .htaccess does not effect all the subdirectories. For example, in my situation, i have a series of downloads folders that may have subs created in them by people other than me. So my problem is i want the styling to automatically be generated on those folders without me having to go back and copy a header.htm, footer.htm and .htaccess.

My code is as follows:

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.foothillsbaptist.org
AuthUserFile
/home/footh4/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/footh4/public_html/_vti_pvt/service.grp
Options +Indexes
   IndexOptions FancyIndexing SuppressDescription SuppressHTMLPreamble FoldersFirst
   HeaderName header.htm
   ReadmeName footer.htm
   IndexIgnore header.htm footer.htm .htaccess direclogo.gif
suPHP_ConfigPath /home/footh4/public_html
'

Thanks for your help.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Quote: http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html#headername

Both HeaderName and ReadmeName now treat Filename as a URI path relative to the one used to access the directory being indexed. If Filename begins with a slash, it will be taken to be relative to the DocumentRoot.

So, assuming your "header.htm" and "footer.htm" are in your root directory...

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.foothillsbaptist.org
AuthUserFile
/home/footh4/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/footh4/public_html/_vti_pvt/service.grp
Options +Indexes
   IndexOptions FancyIndexing SuppressDescription SuppressHTMLPreamble FoldersFirst
   HeaderName /header.htm
   ReadmeName /footer.htm
   IndexIgnore header.htm footer.htm .htaccess direclogo.gif
suPHP_ConfigPath /home/footh4/public_html
'

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.