Author: rbowen
Date: Mon May 25 16:34:57 2026
New Revision: 1934599
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/trunk/docs/manual/env.xml
httpd/httpd/trunk/docs/manual/expr.xml
Modified: httpd/httpd/trunk/docs/manual/env.xml
==============================================================================
--- httpd/httpd/trunk/docs/manual/env.xml Mon May 25 16:17:06 2026 (r1934598)
+++ httpd/httpd/trunk/docs/manual/env.xml Mon May 25 16:34:57 2026 (r1934599)
@@ -191,6 +191,18 @@
</directivelist>
</related>
+ <note>
+ <title>Modern alternative: Expressions</title>
+ <p>Many use cases that previously required setting and testing
+ environment variables — including conditional headers, access
+ control, and logging — 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/trunk/docs/manual/expr.xml
==============================================================================
--- httpd/httpd/trunk/docs/manual/expr.xml Mon May 25 16:17:06 2026 (r1934598)
+++ httpd/httpd/trunk/docs/manual/expr.xml Mon May 25 16:34:57 2026 (r1934599)
@@ -71,6 +71,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>
@@ -203,6 +204,12 @@ DIGIT ::= <any US-ASCII digit "
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
@@ -637,6 +644,12 @@ DIGIT ::= <any US-ASCII digit "
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.