]> granicus.if.org Git - apache/commitdiff
Update syntax for expr.xml
authorDaniel Gruno <humbedooh@apache.org>
Fri, 27 Apr 2012 07:13:21 +0000 (07:13 +0000)
committerDaniel Gruno <humbedooh@apache.org>
Fri, 27 Apr 2012 07:13:21 +0000 (07:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331257 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/expr.html.en
docs/manual/expr.xml

index 227b1332d6ec4e284ab82045f44cd82513dcbb41..b8592ac65f6cc1703c3a5a5007de98d8db9db60f 100644 (file)
@@ -449,26 +449,23 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
        
        <p>The following examples show how expressions might be used to evaluate requests:</p>
        
-       <div class="example"><p><code>
-       # Compare the host name to example.com and redirect to www.example.com if it matches<br />
-       &lt;If "%{HTTP_HOST} == 'example.com'"&gt;<br />
-       <span class="indent">
-               Redirect permanent / http://www.example.com<br />
-       </span>
-       &lt;/If&gt;<br /><br />
-       # Force text/plain if requesting a file with the query string contains 'forcetext'<br />
-       &lt;If "%{QUERY_STRING} =~ /forcetext/"&gt;<br />
-       <span class="indent">
-               ForceType text/plain<br />
-       </span>
-       &lt;/If&gt;<br /><br />
-       # Only allow access to this content during business hours<br />
-       &lt;Directory "/foo/bar/business"&gt;<br />
-       <span class="indent">
-               Require expr %{TIME_HOUR} &gt;= 9 &amp;&amp; %{TIME_HOUR} &lt;= 17 <br />
-       </span>
-       &lt;/Directory&gt;      
-       </code></p></div>
+       <pre class="prettyprint lang-config">
+# Compare the host name to example.com and redirect to www.example.com if it matches
+&lt;If "%{HTTP_HOST} == 'example.com'"&gt;
+    Redirect permanent / http://www.example.com
+&lt;/If&gt;
+
+# Force text/plain if requesting a file with the query string contains 'forcetext'
+&lt;If "%{QUERY_STRING} =~ /forcetext/"&gt;
+    ForceType text/plain
+&lt;/If&gt;
+
+# Only allow access to this content during business hours
+&lt;Directory "/foo/bar/business"&gt;
+    Require expr %{TIME_HOUR} &gt;= 9 &amp;&amp; %{TIME_HOUR} &lt;= 17 
+&lt;/Directory&gt;     
+       </pre>
+
 </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
 <div class="section">
 <h2><a name="other" id="other">Other</a></h2>
index 015e5942a8b7d43f79ba1cdf3e3554139c92e460..be482e96c3edb93abde1bdd8158c7efa41a20f20 100644 (file)
@@ -476,26 +476,22 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
        <title>Example expressions</title>
        <p>The following examples show how expressions might be used to evaluate requests:</p>
        <!-- This section should probably be extended with more, useful examples -->
-       <example>
-       # Compare the host name to example.com and redirect to www.example.com if it matches<br />
-       &lt;If "%{HTTP_HOST} == 'example.com'"&gt;<br />
-       <indent>
-               Redirect permanent / http://www.example.com<br />
-       </indent>
-       &lt;/If&gt;<br /><br />
-       # Force text/plain if requesting a file with the query string contains 'forcetext'<br />
-       &lt;If "%{QUERY_STRING} =~ /forcetext/"&gt;<br />
-       <indent>
-               ForceType text/plain<br />
-       </indent>
-       &lt;/If&gt;<br /><br />
-       # Only allow access to this content during business hours<br />
-       &lt;Directory "/foo/bar/business"&gt;<br />
-       <indent>
-               Require expr %{TIME_HOUR} &gt;= 9 &amp;&amp; %{TIME_HOUR} &lt;= 17 <br />
-       </indent>
-       &lt;/Directory&gt;      
-       </example>
+       <highlight language="config">
+# Compare the host name to example.com and redirect to www.example.com if it matches
+&lt;If "%{HTTP_HOST} == 'example.com'"&gt;
+    Redirect permanent / http://www.example.com
+&lt;/If&gt;
+
+# Force text/plain if requesting a file with the query string contains 'forcetext'
+&lt;If "%{QUERY_STRING} =~ /forcetext/"&gt;
+    ForceType text/plain
+&lt;/If&gt;
+
+# Only allow access to this content during business hours
+&lt;Directory "/foo/bar/business"&gt;
+    Require expr %{TIME_HOUR} &gt;= 9 &amp;&amp; %{TIME_HOUR} &lt;= 17 
+&lt;/Directory&gt;     
+       </highlight>
 </section>
 
 <section id="other">