From: Rich Bowen Date: Fri, 22 May 2026 01:49:54 +0000 (+0000) Subject: Clarifies what CGIVar does. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=73565fac0a76e1952a4687d4d184f26b5213192e;p=thirdparty%2Fapache%2Fhttpd.git Clarifies what CGIVar does. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1934488 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index 6faec1dfbf..307620e709 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -679,26 +679,43 @@ variables Available in Apache HTTP Server 2.4.21 and later -

This directive controls how some CGI variables are set.

- -

REQUEST_URI rules:

+

This directive controls how certain CGI environment variables are + set when requests are passed to CGI scripts or other handlers that + receive a CGI environment. Currently, the only variable supported is + REQUEST_URI.

+ +

By default, the CGI environment variable REQUEST_URI + is set to the original URI from the client's request line. This means + that even if mod_rewrite or an internal redirect + changes which resource is actually being served, the CGI script still + sees the original URI that the client sent.

+ +

With CGIVar REQUEST_URI current-uri, the value is + instead set to the current URI after any rewrites or internal + redirects have been applied.

+ +

Allowed values:

original-uri (default)
-
The value is taken from the original request line, and will not - reflect internal redirects or subrequests which change the requested - resource.
+
Set REQUEST_URI to the URI from the original client + request, regardless of any internal redirects or rewrites.
current-uri
-
The value reflects the resource currently being processed, - which may be different than the original request from the client - due to internal redirects or subrequests.
+
Set REQUEST_URI to the URI of the resource + currently being processed, which may differ from the original + request due to internal redirects or rewrites.
+ +# Show CGI scripts the rewritten URI rather than the original +CGIVar REQUEST_URI current-uri + + 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.

+

The CGI environment variable REQUEST_URI (in either + mode) contains the full URI 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 (no query string).