</section>
+ <section id="redirect-vars"><title>REDIRECT_ variables</title>
+
+ <p>When an internal redirect occurs — whether from an
+ <directive module="core">ErrorDocument</directive>,
+ <module>mod_rewrite</module>,
+ <directive module="mod_dir">FallbackResource</directive>, or
+ any other internal redirect mechanism — the environment
+ variables from the original request are made available to the
+ redirect target with a <code>REDIRECT_</code> prefix.</p>
+
+ <p>Two additional variables are always set:</p>
+
+ <dl>
+ <dt><code>REDIRECT_URL</code></dt>
+ <dd>The URL-path of the original request before the internal
+ redirect. This is set by the core server, not by any specific
+ module.</dd>
+
+ <dt><code>REDIRECT_STATUS</code></dt>
+ <dd>The HTTP status code that triggered the redirect. For
+ error documents this is the error status (e.g., 404). For
+ internal redirects from <module>mod_rewrite</module> or
+ <directive module="mod_dir">FallbackResource</directive>,
+ this is typically 200.</dd>
+ </dl>
+
+ <p>For example, if <code>REQUEST_URI</code> was
+ <code>/original/path</code> and an internal redirect sends the
+ request to <code>/handler.php</code>, then the redirect target
+ will see <code>REDIRECT_URL=/original/path</code> and
+ <code>REQUEST_URI=/handler.php</code>.</p>
+
+ <p>These variables are available to CGI scripts, SSI pages, and
+ in <a href="expr.html">expressions</a>. For more information
+ about REDIRECT_ variables in the context of error documents,
+ see <a href="custom-error.html">Custom Error Responses</a>.</p>
+
+ </section>
+
<section id="examples">
<title>Examples</title>