Forum Moderators: phranque

Message Too Old, No Replies

disallow hidden directory access with httpd.conf

         

alternapop

11:19 pm on Jun 25, 2008 (gmt 0)

10+ Year Member



i'd like to disallow any hidden files and directories, and contents within a hidden directory from being displayed.

i know i can disallow hidden files with this:


<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>

using these paths, as examples:
www.example.com/.hidden/default.html
www.example.com/.hide/images/logo.png

what do i need to do to disallow anything from within ".hidden" and ".hide" from being displayed? not only ".hidden" and ".hide" but any and all hidden folders, files and contents... so that if any part of the file path is hidden, don't show it.

thanks,
chris

coopster

2:34 pm on Jun 26, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, alternapop.

Apache also has a <DirectoryMatch> Directive [httpd.apache.org]