to change the scope of other configuration directives.</p>
</div>
<div id="quickview"><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#types">Types of Configuration Section Containers</a></li>
-<li><img alt="" src="./images/down.gif" /> <a href="#file-and-web">Filesystem and Webspace</a></li>
+<li><img alt="" src="./images/down.gif" /> <a href="#file-and-web">Filesystem, Webspace, and Boolean Expressions</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#virtualhost">Virtual Hosts</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#proxy">Proxy</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#whatwhere">What Directives are Allowed?</a></li>
restrictions.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
-<h2><a name="file-and-web" id="file-and-web">Filesystem and Webspace</a></h2>
+<h2><a name="file-and-web" id="file-and-web">Filesystem, Webspace, and Boolean Expressions</a></h2>
<p>The most commonly used configuration section containers are the
ones that change the configuration of particular places in the
+<h3><a name="expressions" id="expressions">Boolean expressions</a></h3>
+<p>The <code class="directive"><a href="./mod/core.html#if"><If></a></code>
+directive change the configuration depending on a condition which can be
+expressed by a boolean expression. For example, the following configuration
+denies access if the HTTP Referer header does not start with
+"http://www.example.com/".</p>
+<div class="example"><p><code>
+<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')"><br />
+Require all denied<br />
+</If>
+</code></p></div>
+
+
+
<h3><a name="whichwhen" id="whichwhen">What to use When</a></h3>
<p>Choosing between filesystem containers and webspace containers is
to all requests regardless of the specific URL.</p>
+<h3><a name="nesting" id="nesting">Nesting of sections</a></h3>
+
+<p>Some section types can be nested inside other section types. One the one
+hand, <code class="directive"><a href="./mod/core.html#file"><File></a></code> can be used
+inside <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code>. On
+the other hand, <code class="directive"><a href="./mod/core.html#if"><If></a></code> can
+be used inside <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code>,
+<code class="directive"><a href="./mod/core.html#location"><Location></a></code>, and <code class="directive"><a href="./mod/core.html#files"><Files></a></code> sections. The regex
+counterparts of the named section behave identically.</p>
+
+<p>Nested sections are merged after non-nested sections of the same type.</p>
+
+
+
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="virtualhost" id="virtualhost">Virtual Hosts</a></h2>
<li><code class="directive"><a href="./mod/core.html#location"><Location></a></code>
and <code class="directive"><a href="./mod/core.html#locationmatch"><LocationMatch></a></code> done simultaneously</li>
+
+ <li><code class="directive"><a href="./mod/core.html#if"><If></a></code>
+ </li>
+
</ol>
<p>Apart from <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code>, each group is processed in