From: Vincent Deffontaines Date: Tue, 2 Nov 2010 13:40:27 +0000 (+0000) Subject: Porting previous commit on 2.2 doc, with a not about why .htaccess is bad when you... X-Git-Tag: 2.3.9~185 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40809271aed2e1b88dc5bc33ce77402464058f8e;p=apache Porting previous commit on 2.2 doc, with a not about why .htaccess is bad when you have access to main server config. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1030041 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/howto/htaccess.html.en b/docs/manual/howto/htaccess.html.en index 496281a7e1..37207d0625 100644 --- a/docs/manual/howto/htaccess.html.en +++ b/docs/manual/howto/htaccess.html.en @@ -40,6 +40,9 @@ changes on a per-directory basis.

top

.htaccess files

+
You should avoid using .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.
top
@@ -103,7 +106,7 @@ changes on a per-directory basis.

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
in a Directory section, in your main server configuration file, is the preferred way to implement this, and .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 -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.