httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (David Robinson)
Subject Re: Those pesky .htaccess files
Date Thu, 13 Jul 1995 15:18:00 GMT
>From: Mark J Cox <>
>Date: Fri, 7 Jul 1995 13:01:29 +0100 (BST)

>It's a real pain that everytime someone accesses a document 
>(say /usr/local/etc/httpd/docs/index.html) the server stats .htaccess 
>files in /usr, /usr/local, /usr/local/etc, /usr/local/etc/httpd and
>/usr/local/etc/httpd/docs first.
>How about the option of caching the fact that a .htaccess file does or
>doesn't exist in each directory?  You could nominate directories to
>be cached (so ~/ directories for instance wouldn't be to allow users to
>change .htaccess files immediately, others would wait until the server 
>was restarted).  
>This could be complex; but even just saying in a config file:
>NoAccessFile /usr
>NoAccessFile /usr/local
>NoAccessFile /usr/local/etc
>NoAccessFile /usr/local/etc/httpd
>Would save four stats per request!  Has anyone profiled Apache/Shambhala
>to see how much time is wasted on these stats per request?

Does anyone actually rely on .htaccess files in directories above
DocumentRoot? I would rather that was disabled, but perhaps with a
compatability option.

Of course, .htaccess is a bit of a misnomer, anyway.
Part of the problem is that it can contain two types of directives;
those which could apply to a sub-tree of the directory, and those
which are only useful in the leaf directory.

e.g. consider http://a/dira/dirb/dirc/

/root/dira/.htaccess, /root/dira/dirb/.htaccess and
/root/dira/dirb/dirc/.htaccess   might all contain directives such
as AuthName  which would apply to subdirectories of dirc/.

However, /root/dira/dirb/dirc/.htaccess might also contain directives
specific to that directory only, such as AddDescription.

Thus, if I want to allow per-directory AddDescription directives, I have
to enable full heirachical .htaccess searching, whereas it reading a single
file in the target directory would suffice.


View raw message