From: Rich Bowen Date: Sun, 3 May 2026 16:11:04 +0000 (+0000) Subject: core, mod_rewrite, expr: Clarify that REQUEST_URI server variable differs from CGI... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cdfade825351dcb3363b397075d85fe3eeddc90c;p=thirdparty%2Fapache%2Fhttpd.git core, mod_rewrite, expr: Clarify that REQUEST_URI server variable differs from CGI env var of same name (Bug 62663) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933772 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 3005ff6e98..0479098542 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -238,7 +238,10 @@ DIGIT ::= <any US-ASCII digit "0".."9"> REQUEST_SCHEME The scheme part of the request's URI REQUEST_URI - The path part of the request's URI + The path part of the request's URI, excluding the query + string. Note that this differs from the CGI environment + variable of the same name, which includes the query string. + DOCUMENT_URI Same as REQUEST_URI REQUEST_FILENAME diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 52ecc770d0..a61df7359d 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -678,6 +678,13 @@ variables which may be different than the original request from the client due to internal redirects or subrequests. + + Note +

The CGI environment variable REQUEST_URI contains the + full original URI from the request line, including the query string. + This differs from the server variable %{REQUEST_URI} + used in mod_rewrite and + ap_expr, which contains only the path component.

diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index e4ce9c1e5b..970e2c27bd 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -670,6 +670,12 @@ AliasMatch "^/myapp" "/opt/myapp-1.2.3" REQUEST_URI has already been %-decoded, to re-encode it pass it through the "escape" mapping-function. + Note that this server variable differs from the CGI + environment variable of the same name: in a CGI context, + REQUEST_URI contains the full original URI + from the request line, including the query string. See + the CGIVar + directive for details.
THE_REQUEST