From: Vincent Deffontaines
.htaccess
files completely if you have access to
+ httpd main server config file. Using .htaccess
files slows down your Apache server.
+ Any directive that you can include in a .htaccess
file is better set in a Directory
block, as it will have the same effect with better performance.Related Modules | Related Directives |
---|---|
In general, you should only use .htaccess
files when
you don't have access to the main server configuration file. There is,
for example, a common misconception that user authentication should
- always be done in .htaccess
files, and, in more recent years,
+ always be done in .htaccess
files, and, in more recent years,
another miscomception that mod_rewrite
directives
must go in .htaccess
files. This is simply not the
case. You can put user authentication configurations in the main server
@@ -124,7 +127,7 @@ changes on a per-directory basis.
However, in general, use of .htaccess
files should be
avoided when possible. Any configuration that you would consider
putting in a .htaccess
file, can just as effectively be
- made in a <Directory>
section in your main server
+ made in a <Directory>
section in your main server
configuration file.
There are two main reasons to avoid the use of
@@ -397,7 +400,7 @@ Options +IncludesNoExec -ExecCGI
a level sufficient for the directive you've used. Consult the
documentation for that particular directive to determine which is
the case.
Alternately, it may tell you that you had a syntax error in your usage of the directive itself.
diff --git a/docs/manual/howto/htaccess.xml b/docs/manual/howto/htaccess.xml index 27cf03bbee..80aa013c5f 100644 --- a/docs/manual/howto/htaccess.xml +++ b/docs/manual/howto/htaccess.xml @@ -31,6 +31,9 @@ changes on a per-directory basis. @@ -325,7 +328,7 @@ Options +IncludesNoExec -ExecCGI.htaccess
files should be used only
- if you don't have access to the main server configuration file. See above for a discussion of when you should and should
not use .htaccess
files.
@@ -430,7 +433,7 @@ Options +IncludesNoExec -ExecCGIAlternately, it may tell you that you had a syntax error in your usage of the directive itself.