You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by hu...@apache.org on 2012/04/27 09:13:21 UTC
svn commit: r1331257 - in /httpd/httpd/trunk/docs/manual: expr.html.en
expr.xml
Author: humbedooh
Date: Fri Apr 27 07:13:21 2012
New Revision: 1331257
URL: http://svn.apache.org/viewvc?rev=1331257&view=rev
Log:
Update syntax for expr.xml
Modified:
httpd/httpd/trunk/docs/manual/expr.html.en
httpd/httpd/trunk/docs/manual/expr.xml
Modified: httpd/httpd/trunk/docs/manual/expr.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/expr.html.en?rev=1331257&r1=1331256&r2=1331257&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/expr.html.en (original)
+++ httpd/httpd/trunk/docs/manual/expr.html.en Fri Apr 27 07:13:21 2012
@@ -449,26 +449,23 @@ listfunction ::= listfuncname "<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 />
- <If "%{HTTP_HOST} == 'example.com'"><br />
- <span class="indent">
- Redirect permanent / http://www.example.com<br />
- </span>
- </If><br /><br />
- # Force text/plain if requesting a file with the query string contains 'forcetext'<br />
- <If "%{QUERY_STRING} =~ /forcetext/"><br />
- <span class="indent">
- ForceType text/plain<br />
- </span>
- </If><br /><br />
- # Only allow access to this content during business hours<br />
- <Directory "/foo/bar/business"><br />
- <span class="indent">
- Require expr %{TIME_HOUR} >= 9 && %{TIME_HOUR} <= 17 <br />
- </span>
- </Directory>
- </code></p></div>
+ <pre class="prettyprint lang-config">
+# Compare the host name to example.com and redirect to www.example.com if it matches
+<If "%{HTTP_HOST} == 'example.com'">
+ Redirect permanent / http://www.example.com
+</If>
+
+# Force text/plain if requesting a file with the query string contains 'forcetext'
+<If "%{QUERY_STRING} =~ /forcetext/">
+ ForceType text/plain
+</If>
+
+# Only allow access to this content during business hours
+<Directory "/foo/bar/business">
+ Require expr %{TIME_HOUR} >= 9 && %{TIME_HOUR} <= 17
+</Directory>
+ </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>
Modified: httpd/httpd/trunk/docs/manual/expr.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/expr.xml?rev=1331257&r1=1331256&r2=1331257&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/expr.xml (original)
+++ httpd/httpd/trunk/docs/manual/expr.xml Fri Apr 27 07:13:21 2012
@@ -476,26 +476,22 @@ listfunction ::= listfuncname "<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 />
- <If "%{HTTP_HOST} == 'example.com'"><br />
- <indent>
- Redirect permanent / http://www.example.com<br />
- </indent>
- </If><br /><br />
- # Force text/plain if requesting a file with the query string contains 'forcetext'<br />
- <If "%{QUERY_STRING} =~ /forcetext/"><br />
- <indent>
- ForceType text/plain<br />
- </indent>
- </If><br /><br />
- # Only allow access to this content during business hours<br />
- <Directory "/foo/bar/business"><br />
- <indent>
- Require expr %{TIME_HOUR} >= 9 && %{TIME_HOUR} <= 17 <br />
- </indent>
- </Directory>
- </example>
+ <highlight language="config">
+# Compare the host name to example.com and redirect to www.example.com if it matches
+<If "%{HTTP_HOST} == 'example.com'">
+ Redirect permanent / http://www.example.com
+</If>
+
+# Force text/plain if requesting a file with the query string contains 'forcetext'
+<If "%{QUERY_STRING} =~ /forcetext/">
+ ForceType text/plain
+</If>
+
+# Only allow access to this content during business hours
+<Directory "/foo/bar/business">
+ Require expr %{TIME_HOUR} >= 9 && %{TIME_HOUR} <= 17
+</Directory>
+ </highlight>
</section>
<section id="other">