From: Rich Bowen Date: Mon, 25 May 2026 16:35:10 +0000 (+0000) Subject: Add crosslinks between env.html and expr.html X-Git-Tag: 2.4.68-rc1-candidate~88 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=fdd7a60537f714f7b747deef3d60f89848b91c28;p=thirdparty%2Fapache%2Fhttpd.git 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1934600 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/env.xml b/docs/manual/env.xml index 6fb0cc8b39..4365656f92 100644 --- a/docs/manual/env.xml +++ b/docs/manual/env.xml @@ -191,6 +191,18 @@ + + Modern alternative: Expressions +

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 + If expressions + with the reqenv function. See + Expressions in Apache HTTP Server for the + expression syntax and the full list of available + variables.

+
+
CGI Scripts @@ -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, + Require expr provides + an alternative that can evaluate environment variables using + the reqenv function alongside other request properties.

@@ -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.

+ discuss a few of these. For the complete list of request + variables available in expressions + (including REQUEST_URI, REMOTE_ADDR, + SERVER_NAME, and many others), see the + expression variables reference.

+ +

Refer to the CGI spec for further details of the standard + CGI meta-variables.

QUERY_STRING diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 97ebf31f5b..27cfb5c74a 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -69,6 +69,7 @@ SSLRequire LogMessage mod_include +Environment Variables in Apache httpd
Grammar in Backus-Naur Form notation @@ -160,6 +161,12 @@ listfunction ::= listfuncname "(" word ")" directive is evaluated before authentication is done. Therefore, %{REMOTE_USER} will not be set in this case.

+

For information on setting and manipulating request environment + variables (using SetEnv, + SetEnvIf, + mod_rewrite's [E=...] flag, and + others), see Environment Variables in Apache httpd.

+

The following variables provide the values of the named HTTP request headers. The values of other headers can be obtained with the req function. Using these @@ -562,6 +569,12 @@ listfunction ::= listfuncname "(" word ")" exact timing depends on the directive the expression has been used within. +

The reqenv function can be used to test + special-purpose environment variables + (such as no-gzip, nokeepalive, etc.) as + well as any variables set via SetEnv, + SetEnvIf, or mod_rewrite.

+

When the functions req or http 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