From 2a84c5acdf0e679fab3573958bf272c3dd524bae Mon Sep 17 00:00:00 2001
From: Joshua Slive
Date: Tue, 3 May 2005 19:53:21 +0000
Subject: [PATCH] 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/trunk@167970 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/howto/htaccess.html.en | 28 +++++++++++++++++++++++++++
docs/manual/howto/htaccess.xml | 31 ++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)
diff --git a/docs/manual/howto/htaccess.html.en b/docs/manual/howto/htaccess.html.en
index e6b02f4f34..2633309321 100644
--- a/docs/manual/howto/htaccess.html.en
+++ b/docs/manual/howto/htaccess.html.en
@@ -239,6 +239,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.
+
+
+
+ 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>
+
+
+

diff --git a/docs/manual/howto/htaccess.xml b/docs/manual/howto/htaccess.xml
index 374030cd2d..6978a65cfd 100644
--- a/docs/manual/howto/htaccess.xml
+++ b/docs/manual/howto/htaccess.xml
@@ -265,6 +265,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
--
2.50.1