include the onerror path fails, or if onerror is not specified, the
default error message will be included.</p>
- <div class="example"><p><code>
- # Simple example<br />
- <!--#include virtual="/not-exist.html" onerror="/error.html" -->
- </code></p></div>
+ <div class="example"><pre class="prettyprint lang-html"># Simple example
+<!--#include virtual="/not-exist.html" onerror="/error.html" --></pre>
+</div>
- <div class="example"><p><code>
- # Dedicated onerror paths<br />
- <!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" -->
- </code></p></div>
+ <div class="example"><pre class="prettyprint lang-html"># Dedicated onerror paths
+<!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --></pre>
+</div>
</dd>
</dl>
<p>The basic flow control elements are:</p>
- <div class="example"><p><code>
- <!--#if expr="<var>test_condition</var>" --><br />
- <!--#elif expr="<var>test_condition</var>" --><br />
- <!--#else --><br />
- <!--#endif -->
- </code></p></div>
+ <div class="example"><pre class="prettyprint lang-html"><!--#if expr="test_condition" -->
+<!--#elif expr="test_condition" -->
+<!--#else -->
+<!--#endif --></pre>
+</div>
<p>The <code>if</code> element works like an if statement in a
programming language. The test condition is evaluated and if
<p>The below example will print "from local net" if client IP address
belongs to the 10.0.0.0/8 subnet.</p>
- <div class="example"><p><code>
- <!--#if expr='-R "10.0.0.0/8"' --><br />
- <span class="indent">
- from local net<br />
- </span>
- <!--#else --><br />
- <span class="indent">
- from somewhere else<br />
- </span>
- <!--#endif -->
- </code></p></div>
+ <div class="example"><pre class="prettyprint lang-html"><!--#if expr='-R "10.0.0.0/8"' -->
+ from local net
+<!--#else -->
+ from somewhere else
+<!--#endif --></pre>
+</div>
<p>The below example will print "foo is bar" if the variable
<code>foo</code> is set to the value "bar".</p>
- <div class="example"><p><code>
- <!--#if expr='v("foo") = "bar"' --><br />
- <span class="indent">
- foo is bar<br />
- </span>
- <!--#endif -->
- </code></p></div>
+ <div class="example"><pre class="prettyprint lang-html"><!--#if expr='v("foo") = "bar"' -->
+ foo is bar
+<!--#endif --></pre>
+</div>
<div class="note"><h3>Reference Documentation</h3>
<p>See also: <a href="../expr.html">Expressions in Apache HTTP Server</a>,
URL, such as a link to that URL. Note that the URL is only tested
for whether access would be granted, not whether the URL exists.</p>
- <div class="example"><h3>Example</h3><p><code>
- <!--#if expr="-A /private" --><br />
- <span class="indent">
- Click <a href="/private">here</a> to access private
- information.<br />
- </span>
- <!--#endif -->
- </code></p></div>
+ <div class="example"><h3>Example</h3><pre class="prettyprint lang-html"><!--#if expr="-A /private" -->
+ Click <a href="/private">here</a> to access private
+ information.
+<!--#endif --></pre>
+</div>
</dd>
<dt><code><var>string1</var> = <var>string2</var><br />
<code>$9</code>. The whole string matched by the regular expression is
stored in the special variable <code>$0</code></p>
- <div class="example"><h3>Example</h3><p><code>
- <!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --><br />
- <span class="indent">
- <!--#set var="session" value="$1" --><br />
- </span>
- <!--#endif -->
- </code></p></div>
+ <div class="example"><h3>Example</h3><pre class="prettyprint lang-html"><!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" -->
+ <!--#set var="session" value="$1" -->
+<!--#endif --></pre>
+</div>
</dd>
<dt><code><var>string1</var> < <var>string2</var><br />
"<code>&&</code>" and "<code>||</code>". "<code>!</code>" binds
most tightly. Thus, the following are equivalent:</p>
- <div class="example"><p><code>
- <!--#if expr="$a = test1 && $b = test2" --><br />
- <!--#if expr="($a = test1) && ($b = test2)" -->
- </code></p></div>
+ <div class="example"><pre class="prettyprint lang-html"><!--#if expr="$a = test1 && $b = test2" -->
+<!--#if expr="($a = test1) && ($b = test2)" --></pre>
+</div>
<p>The boolean operators <code>&&</code> and <code>||</code>
share the same priority. So if you want to bind such an operator more
default error message will be included.</p>
<example>
- # Simple example<br />
- <!--#include virtual="/not-exist.html" onerror="/error.html" -->
+<highlight language="html">
+# Simple example
+<!--#include virtual="/not-exist.html" onerror="/error.html" -->
+</highlight>
</example>
<example>
- # Dedicated onerror paths<br />
- <!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" -->
+<highlight language="html">
+# Dedicated onerror paths
+<!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" -->
+</highlight>
</example>
</dd>
<p>The basic flow control elements are:</p>
<example>
- <!--#if expr="<var>test_condition</var>" --><br />
- <!--#elif expr="<var>test_condition</var>" --><br />
- <!--#else --><br />
- <!--#endif -->
+<highlight language="html">
+<!--#if expr="test_condition" -->
+<!--#elif expr="test_condition" -->
+<!--#else -->
+<!--#endif -->
+</highlight>
</example>
<p>The <code>if</code> element works like an if statement in a
belongs to the 10.0.0.0/8 subnet.</p>
<example>
- <!--#if expr='-R "10.0.0.0/8"' --><br />
- <indent>
- from local net<br />
- </indent>
- <!--#else --><br />
- <indent>
- from somewhere else<br />
- </indent>
- <!--#endif -->
+<highlight language="html">
+<!--#if expr='-R "10.0.0.0/8"' -->
+ from local net
+<!--#else -->
+ from somewhere else
+<!--#endif -->
+</highlight>
</example>
<p>The below example will print "foo is bar" if the variable
<code>foo</code> is set to the value "bar".</p>
<example>
- <!--#if expr='v("foo") = "bar"' --><br />
- <indent>
- foo is bar<br />
- </indent>
- <!--#endif -->
+<highlight language="html">
+<!--#if expr='v("foo") = "bar"' -->
+ foo is bar
+<!--#endif -->
+</highlight>
</example>
<note><title>Reference Documentation</title>
for whether access would be granted, not whether the URL exists.</p>
<example><title>Example</title>
- <!--#if expr="-A /private" --><br />
- <indent>
- Click <a href="/private">here</a> to access private
- information.<br />
- </indent>
- <!--#endif -->
+<highlight language="html">
+<!--#if expr="-A /private" -->
+ Click <a href="/private">here</a> to access private
+ information.
+<!--#endif -->
+</highlight>
</example>
</dd>
stored in the special variable <code>$0</code></p>
<example><title>Example</title>
- <!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --><br />
- <indent>
- <!--#set var="session" value="$1" --><br />
- </indent>
- <!--#endif -->
+<highlight language="html">
+<!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" -->
+ <!--#set var="session" value="$1" -->
+<!--#endif -->
+</highlight>
</example>
</dd>
most tightly. Thus, the following are equivalent:</p>
<example>
- <!--#if expr="$a = test1 && $b = test2" --><br />
- <!--#if expr="($a = test1) && ($b = test2)" -->
+<highlight language="html">
+<!--#if expr="$a = test1 && $b = test2" -->
+<!--#if expr="($a = test1) && ($b = test2)" -->
+</highlight>
</example>
<p>The boolean operators <code>&&</code> and <code>||</code>