From: Joshua Slive Date: Tue, 3 May 2005 19:54:47 +0000 (+0000) Subject: Backport: X-Git-Tag: 2.0.55~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a75d83e016fea233d8d141b3b2564610bfdc0c7c;p=thirdparty%2Fapache%2Fhttpd.git Backport: Add a little detail about merging of .htaccess with httpd.conf, and provide an example to enforce certain settings. PR: 31782 Submitted by: Ray Ferguson , Joshua Slive git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@167971 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/howto/htaccess.html.en b/docs/manual/howto/htaccess.html.en index 16aba134a48..fc0b8dc4850 100644 --- a/docs/manual/howto/htaccess.html.en +++ b/docs/manual/howto/htaccess.html.en @@ -238,6 +238,34 @@ changes on a per-directory basis.

permitted, as only Options Includes is in effect, which completely overrides any earlier setting that may have been in place.

+ +

Merging of .htaccess with the main + configuration files

+ +

As discussed in the documentation on Configuration Sections, + .htaccess files can override the <Directory> sections for + the corresponding directory, but will be overriden by other types + of configuration sections from the main configuration files. This + fact can be used to enforce certain configurations, even in the + presence of a liberal AllowOverride setting. For example, to + prevent script execution while allowing anything else to be set in + .htaccess you can use:

+ +

+<Directory />
+ +Allowoverride All
+
+</Directory>
+
+<Location />
+ +Options +IncludesNoExec -ExecCGI
+
+</Location> +

+ +
top

Authentication example

diff --git a/docs/manual/howto/htaccess.xml b/docs/manual/howto/htaccess.xml index ca2ba11eaab..d0a508b9706 100644 --- a/docs/manual/howto/htaccess.xml +++ b/docs/manual/howto/htaccess.xml @@ -264,6 +264,37 @@ changes on a per-directory basis.

permitted, as only Options Includes is in effect, which completely overrides any earlier setting that may have been in place.

+ +
Merging of .htaccess with the main + configuration files + +

As discussed in the documentation on Configuration Sections, + .htaccess files can override the Directory sections for + the corresponding directory, but will be overriden by other types + of configuration sections from the main configuration files. This + fact can be used to enforce certain configurations, even in the + presence of a liberal AllowOverride setting. For example, to + prevent script execution while allowing anything else to be set in + .htaccess you can use:

+ + +<Directory />
+ +Allowoverride All
+
+</Directory>
+
+<Location />
+ +Options +IncludesNoExec -ExecCGI
+
+</Location> +
+
+
Authentication example