]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
core, mod_rewrite, expr: Clarify that REQUEST_URI server variable differs from CGI...
authorRich Bowen <rbowen@apache.org>
Sun, 3 May 2026 16:11:04 +0000 (16:11 +0000)
committerRich Bowen <rbowen@apache.org>
Sun, 3 May 2026 16:11:04 +0000 (16:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933772 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/expr.xml
docs/manual/mod/core.xml
docs/manual/mod/mod_rewrite.xml

index 3005ff6e980bba3b4b929b2e68062195175d0939..0479098542f808edee1a0c45974fec2803679881 100644 (file)
@@ -238,7 +238,10 @@ DIGIT       ::= &lt;any US-ASCII digit "0".."9"&gt;
     <tr><td><code>REQUEST_SCHEME</code></td>
         <td>The scheme part of the request's URI</td></tr>
     <tr><td><code>REQUEST_URI</code></td>
-        <td>The path part of the request's URI</td></tr>
+        <td>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.
+            </td></tr>
     <tr><td><code>DOCUMENT_URI</code></td>
         <td>Same as <code>REQUEST_URI</code></td></tr>
     <tr><td><code>REQUEST_FILENAME</code></td>
index 52ecc770d01a2a0d37aa043044705c8046a2bb34..a61df7359de209d58dde7062ee3bea78278efd34 100644 (file)
@@ -678,6 +678,13 @@ variables</description>
     which may be different than the original request from the client
     due to internal redirects or subrequests.</dd>
   </dl>
+
+  <note><title>Note</title>
+  <p>The CGI environment variable <code>REQUEST_URI</code> contains the
+      full original URI from the request line, including the query string.
+      This differs from the server variable <code>%{REQUEST_URI}</code>
+      used in <module>mod_rewrite</module> and <a href="../expr.html">
+      ap_expr</a>, which contains only the path component.</p></note>
 </usage>
 </directivesynopsis>
 
index e4ce9c1e5b5ed5b0e4f7145b6dd28e0c551c47e6..970e2c27bd97ad9fd4400edb592fd0ab3c4fa23e 100644 (file)
@@ -670,6 +670,12 @@ AliasMatch "^/myapp" "/opt/myapp-1.2.3"
                   <code>REQUEST_URI</code> 
                   has already been %-decoded, to re-encode it pass it through
                   the "escape" <a href="#mapfunc">mapping-function</a>.
+                  Note that this server variable differs from the CGI
+                  environment variable of the same name: in a CGI context,
+                  <code>REQUEST_URI</code> contains the full original URI
+                  from the request line, including the query string. See
+                  the <directive module="core">CGIVar</directive>
+                  directive for details.
                   </dd>
 
                   <dt><code>THE_REQUEST</code></dt>