httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject [users@httpd] [DISCUSS] .htaccess for all and everything
Date Fri, 13 Mar 2009 19:00:40 GMT
Hi.

Browsing this list, I often get the impression that people use .htaccess 
files for just about everything, even probably cases where it would be 
better (for performance), clearer (to avoid secondary effects) and 
easier (for control and maintenance) to put functionally equivalent 
instructions in the main httpd.conf (or vhost.conf) configuration file.

As I understand it, enabling .htaccess files has the consequence that 
Apache first has to go down once the path to the final file, checking 
each intermediate directory of the path from 
DocumentRoot/to/the/final/place for associated <Directory> and 
<Location> containers and access directives therein and combine them, 
and then finally when it gets to DocumentRoot/to/the/final/place and 
finds a .htaccess file in it, throw all of that away and restart from 
the beginning.
If the .htaccess are allowed in each intermediate directory, that must 
generate quite an overhead, as compared to a
<Directory /to/the/final/place>
   Allow from ...
   Deny from ...
</Directory>
section.

Similarly, having RewriteRules inside of such a .htaccess makes it quite 
a bit harder to figure out what is going on, independently of the fact 
that any previous global RewriteRules would also have been applied for 
nothing.

About the only advantage that I can see to .htaccess files, is when the 
user has access only to a specific directory on the webserver, and does 
not have access to the Apache configuration file.

Is that an extreme view ?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message