]> granicus.if.org Git - apache/commitdiff
Adding SetEnvIfExpr documentation, and more references to expr.html
authorIgor Galić <igalic@apache.org>
Sat, 20 Nov 2010 21:47:53 +0000 (21:47 +0000)
committerIgor Galić <igalic@apache.org>
Sat, 20 Nov 2010 21:47:53 +0000 (21:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1037339 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/expr.xml
docs/manual/mod/core.xml
docs/manual/mod/mod_filter.xml
docs/manual/mod/mod_include.xml
docs/manual/mod/mod_setenvif.xml

index b3ef8e9305eb0082f62327ac5caa1a12cbf9a742..4a86f5acc6afc67b55dd5cf1265effb65b4e9a52 100644 (file)
@@ -22,7 +22,7 @@
 
 <manualpage metafile="expr.xml.meta">
 
-  <title>Expressions in Apache</title>
+  <title>Expressions in Apache HTTP Server</title>
 
   <summary>
     <p>Historically, there are several syntax variants for expressions used to express
@@ -299,7 +299,7 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
     <tr><td><code>note</code></td>
         <td>Lookup request environment variable</td></tr>
     <tr><td><code>env</code></td>
-        <td>Reqturn first match of <code>note</code>, <code>reqenv</code>,
+        <td>Return first match of <code>note</code>, <code>reqenv</code>,
             <code>osenv</code></td></tr>
     <tr><td><code>tolower</code></td>
         <td>Convert string to lower case</td></tr>
index 57838f24cb171e4646e934b6d452b0c07af02f93..33a955bc862e6a9b137cb319bc53b27244bb6917 100644 (file)
@@ -1594,6 +1594,8 @@ satisfied by a request at runtime</description>
 
 </usage>
 
+<seealso><a href="../expr.html">Expressions in Apache HTTP Server</a>,
+for a complete reference and more examples.</seealso>
 <seealso><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
     &lt;Files&gt; sections work</a> for an explanation of how these
     different sections are combined when a request is received.
index 2a9880d79d8fce62c734a732cab60e3f728248c9..9e6ccf46b9e9672d8448782becdddc058a87823a 100644 (file)
     <code>ap_register_output_filter</code>.
     </p>
 
-    <p><var>expression</var> is described in the
+    <p><var>expression</var> is an
     <a href="../expr.html">ap_expr documentation</a>.</p>
 
 </usage>
+<seealso><a href="../expr.html">Expressions in Apache HTTP Server</a>,
+for a complete reference and examples.</seealso>
+<seealso><module>mod_include</module></seealso>
 </directivesynopsis>
 
 <directivesynopsis>
index f843718a772ff4faf98a0722e6a153ccea08f0e8..c817ae7b6f9677d9b7fb8de7c001be329689065b 100644 (file)
      <p>All slashes which are not intended to act as delimiters in your regex must
      be escaped.  This is regardless of their meaning to the regex engine.</p>
     </note>
+
+    <note><title>Reference Documentation</title>
+    <p>See also: <a href="../expr.html">Expressions in Apache HTTP Server</a>,
+    for a complete reference and examples.</p>
+    </note>
 </section>
 
 <directivesynopsis>
index 6c0c92a9d98c4aad09a10dbe5822f9f0aadde2d8..ef639a0a2c7155b880e08993281e9626b0e839c8 100644 (file)
@@ -254,6 +254,49 @@ for additional examples.
 </seealso>
 </directivesynopsis>
 
+
+<directivesynopsis>
+
+<name>SetEnvIfExpr</name>
+<description>Sets environment variables based on an expression</description>
+<syntax>SetEnvIfExpr <em>expr
+    [!]env-variable</em>[=<em>value</em>]
+    [[!]<em>env-variable</em>[=<em>value</em>]] ...</syntax>
+<contextlist><context>server config</context>
+<context>virtual host</context><context>directory</context>
+<context>.htaccess</context></contextlist>
+<override>FileInfo</override>
+
+<usage>
+    <p>The <directive>SetEnvIfExpr</directive> directive defines
+    environment variables based on an <directive type="section">If</directive>
+    <code>ap_expr</code>. These expressions will be evaluated at runtime,
+    and applied <em>env-variable</em> in the same fashion as <directive
+    >SetEnvIf</directive>.</p>
+
+<example>
+    SetEnvIfExpr "tolower(%req['X-Sendfile']) = 'D:\images\very_big.iso')" iso_delivered
+</example>
+
+    <p>This would set the environment variable <code>iso_delivered</code>
+    every time our application attempts to send it via <code>X-Sendfile</code></p>
+
+    <p>For a more useful example, consider the <code>Referer</code>
+    example from above for a site with more than one domain:</p>
+
+<example>
+    SetEnvIfExpr "${HTTP_REFERER} in www.example.com,example.com,w2.example3.org" intra_site_referral
+</example>
+</usage>
+
+<seealso><a href="../expr.html">Expressions in Apache HTTP Server</a>,
+for a complete reference and more examples.</seealso>
+<seealso><directive type="section">If</directive> can be used to achive similar
+results.</seealso>
+<seealso><module>mod_filter</module></seealso>
+<seealso><module>mod_include></module></seealso>
+</directivesynopsis>
+
 <directivesynopsis>
 <name>SetEnvIfNoCase</name>
 <description>Sets environment variables based on attributes of the request