You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2026/05/25 16:35:10 UTC

svn commit: r1934600 - httpd/httpd/branches/2.4.x/docs/manual

Author: rbowen
Date: Mon May 25 16:35:10 2026
New Revision: 1934600

Log:
Add crosslinks between env.html and expr.html

env.html now references expr.html for the modern expression-based
approach to conditional headers, access control, and logging.
The CGI variables section links to the complete variable reference
on expr.html (including REQUEST_URI, REMOTE_ADDR, etc.).

expr.html now links back to env.html for how environment variables
are set (SetEnv, SetEnvIf, [E=...]) and for the special-purpose
variable list.

Addresses: https://bz.apache.org/bugzilla/show_bug.cgi?id=70066

Modified:
   httpd/httpd/branches/2.4.x/docs/manual/env.xml
   httpd/httpd/branches/2.4.x/docs/manual/expr.xml

Modified: httpd/httpd/branches/2.4.x/docs/manual/env.xml
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/env.xml	Mon May 25 16:34:57 2026	(r1934599)
+++ httpd/httpd/branches/2.4.x/docs/manual/env.xml	Mon May 25 16:35:10 2026	(r1934600)
@@ -191,6 +191,18 @@
       </directivelist>
     </related>
 
+    <note>
+      <title>Modern alternative: Expressions</title>
+      <p>Many use cases that previously required setting and testing
+      environment variables &mdash; including conditional headers, access
+      control, and logging &mdash; can now be handled more directly using
+      <directive module="core" type="section">If</directive> expressions
+      with the <code>reqenv</code> function. See
+      <a href="expr.html">Expressions in Apache HTTP Server</a> for the
+      expression syntax and the full list of available
+      <a href="expr.html#vars">variables</a>.</p>
+    </note>
+
     <section id="cgi-scripts">
         <title>CGI Scripts</title>
 
@@ -226,6 +238,10 @@
         allows for flexible control of access to the server based on
         characteristics of the client. For example, you can use these
         directives to deny access to a particular browser (User-Agent).
+        For more complex conditions,
+        <a href="expr.html"><code>Require expr</code></a> provides
+        an alternative that can evaluate environment variables using
+        the <code>reqenv</code> function alongside other request properties.
         </p>
 
     </section>
@@ -292,8 +308,14 @@
     These have been adopted more broadly, and are a standard
     part of passing information between the browser and the
     server, and between processes on the server side. Here we
-    discuss a few of these. Refer to the CGI spec for further
-    details.</p>
+    discuss a few of these. For the complete list of request
+    variables available in <a href="expr.html">expressions</a>
+    (including <code>REQUEST_URI</code>, <code>REMOTE_ADDR</code>,
+    <code>SERVER_NAME</code>, and many others), see the
+    <a href="expr.html#vars">expression variables</a> reference.</p>
+
+    <p>Refer to the CGI spec for further details of the standard
+    CGI meta-variables.</p>
 
     <section id="query-string">
         <title>QUERY_STRING</title>

Modified: httpd/httpd/branches/2.4.x/docs/manual/expr.xml
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/expr.xml	Mon May 25 16:34:57 2026	(r1934599)
+++ httpd/httpd/branches/2.4.x/docs/manual/expr.xml	Mon May 25 16:35:10 2026	(r1934600)
@@ -69,6 +69,7 @@
 <seealso><directive module="mod_ssl">SSLRequire</directive></seealso>
 <seealso><directive module="mod_log_debug">LogMessage</directive></seealso>
 <seealso><module>mod_include</module></seealso>
+<seealso><a href="env.html">Environment Variables in Apache httpd</a></seealso>
 
   <section id="grammar">
     <title>Grammar in Backus-Naur Form notation</title>
@@ -160,6 +161,12 @@ listfunction ::= listfuncname "<strong>(
     directive is evaluated before authentication is done. Therefore,
     <code>%{REMOTE_USER}</code> will not be set in this case.</p>
 
+    <p>For information on setting and manipulating request environment
+    variables (using <directive module="mod_env">SetEnv</directive>,
+    <directive module="mod_setenvif">SetEnvIf</directive>,
+    <module>mod_rewrite</module>'s <code>[E=...]</code> flag, and
+    others), see <a href="env.html">Environment Variables in Apache httpd</a>.</p>
+
     <p>The following variables provide the values of the named HTTP request
     headers. The values of other headers can be obtained with the
     <code>req</code> <a href="#functions">function</a>. Using these
@@ -562,6 +569,12 @@ listfunction ::= listfuncname "<strong>(
     exact timing depends on the directive the expression has been used within.
     </note>
 
+    <p>The <code>reqenv</code> function can be used to test
+    <a href="env.html#special">special-purpose environment variables</a>
+    (such as <code>no-gzip</code>, <code>nokeepalive</code>, etc.) as
+    well as any variables set via <a href="env.html#setting">SetEnv,
+    SetEnvIf, or mod_rewrite</a>.</p>
+
     <p>When the functions <code>req</code> or <code>http</code> are used,
     the header name will automatically be added to the Vary header of the
     HTTP response, except where otherwise noted for the directive accepting