Author: slive
Date: Tue May 3 12:53:21 2005
New Revision: 167970
URL: http://svn.apache.org/viewcvs?rev=167970&view=rev
Log:
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 <ferguson berbee.com>, Joshua Slive
Modified:
httpd/httpd/trunk/docs/manual/howto/htaccess.html.en
httpd/httpd/trunk/docs/manual/howto/htaccess.xml
Modified: httpd/httpd/trunk/docs/manual/howto/htaccess.html.en
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/docs/manual/howto/htaccess.html.en?rev=167970&r1=167969&r2=167970&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/howto/htaccess.html.en (original)
+++ httpd/httpd/trunk/docs/manual/howto/htaccess.html.en Tue May 3 12:53:21 2005
@@ -239,6 +239,34 @@
permitted, as only <code>Options Includes</code> is in effect, which
completely overrides any earlier setting that may have been in
place.</p>
+
+ <h3><a name="merge" id="merge">Merging of .htaccess with the main
+ configuration files</a></h3>
+
+ <p>As discussed in the documentation on <a href="../sections.html">Configuration
Sections</a>,
+ <code>.htaccess</code> files can override the <code class="directive"><a
href="../mod/core.html#directory"><Directory></a></code> 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 <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code>
setting. For example, to
+ prevent script execution while allowing anything else to be set in
+ <code>.htaccess</code> you can use:</p>
+
+ <div class="example"><p><code>
+<Directory /><br />
+<span class="indent">
+Allowoverride All<br />
+</span>
+</Directory><br />
+<br />
+<Location /><br />
+<span class="indent">
+Options +IncludesNoExec -ExecCGI<br />
+</span>
+</Location>
+ </code></p></div>
+
+
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
<div class="section">
<h2><a name="auth" id="auth">Authentication example</a></h2>
Modified: httpd/httpd/trunk/docs/manual/howto/htaccess.xml
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/docs/manual/howto/htaccess.xml?rev=167970&r1=167969&r2=167970&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/howto/htaccess.xml (original)
+++ httpd/httpd/trunk/docs/manual/howto/htaccess.xml Tue May 3 12:53:21 2005
@@ -265,6 +265,37 @@
permitted, as only <code>Options Includes</code> is in effect, which
completely overrides any earlier setting that may have been in
place.</p>
+
+ <section id="merge"><title>Merging of .htaccess with the main
+ configuration files</title>
+
+ <p>As discussed in the documentation on <a
+ href="../sections.html">Configuration Sections</a>,
+ <code>.htaccess</code> files can override the <directive
+ type="section" module="core">Directory</directive> 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 <directive
+ module="core">AllowOverride</directive> setting. For example, to
+ prevent script execution while allowing anything else to be set in
+ <code>.htaccess</code> you can use:</p>
+
+ <example>
+<Directory /><br />
+<indent>
+Allowoverride All<br />
+</indent>
+</Directory><br />
+<br />
+<Location /><br />
+<indent>
+Options +IncludesNoExec -ExecCGI<br />
+</indent>
+</Location>
+ </example>
+</section>
+
</section>
<section id="auth"><title>Authentication example</title>
|