From 8fc73d308f1a8b3e5016a3bdf79a00ac1f14e84d Mon Sep 17 00:00:00 2001 From: Daniel Gruno Date: Fri, 27 Apr 2012 07:13:21 +0000 Subject: [PATCH] Update syntax for expr.xml git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1331257 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/expr.html.en | 37 +++++++++++++++++-------------------- docs/manual/expr.xml | 36 ++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 40 deletions(-) diff --git a/docs/manual/expr.html.en b/docs/manual/expr.html.en index 227b1332d6..b8592ac65f 100644 --- a/docs/manual/expr.html.en +++ b/docs/manual/expr.html.en @@ -449,26 +449,23 @@ listfunction ::= listfuncname "(" word ")"

The following examples show how expressions might be used to evaluate requests:

-

- # 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> -

+
+# 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>	
+	
+
top

Other

diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 015e5942a8..be482e96c3 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -476,26 +476,22 @@ listfunction ::= listfuncname "(" word ")" Example expressions

The following examples show how expressions might be used to evaluate requests:

- - # 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> -
+ +# 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> +
-- 2.49.0