pcs 96/11/27 01:30:52
Modified: htdocs/manual/mod mod_alias.html
Log:
Document the "Redirect [ temp | permanent | seeother | gone ] ..." format of
Redirect directive.
Revision Changes Path
1.4 +26 -4 apache/htdocs/manual/mod/mod_alias.html
Index: mod_alias.html
===================================================================
RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_alias.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -C3 -r1.3 -r1.4
*** mod_alias.html 1996/11/26 06:13:47 1.3
--- mod_alias.html 1996/11/27 09:30:51 1.4
***************
*** 45,56 ****
<A name="redirect"><h2>Redirect</h2></A>
<!--%plaintext <?INDEX {\tt Redirect} directive> -->
! <strong>Syntax:</strong> Redirect <em>url-path url</em><br>
<Strong>Context:</strong> server config, virtual host, directory,
.htaccess<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_alias<br>
<strong>Compatibility:</strong> The directory and .htaccess context's
! are only available in versions 1.1 and later<p>
The Redirect directive maps an old URL into a new one. The new URL is
returned
to the client which attempts to fetch it again with the new address.
--- 45,56 ----
<A name="redirect"><h2>Redirect</h2></A>
<!--%plaintext <?INDEX {\tt Redirect} directive> -->
! <strong>Syntax:</strong> Redirect [ <em>status</em> ] <em>url-path
url</em><br>
<Strong>Context:</strong> server config, virtual host, directory,
.htaccess<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_alias<br>
<strong>Compatibility:</strong> The directory and .htaccess context's
! are only available in versions 1.1 and later. The <em>status</em> argument
is only available in Apache 1.2 or later.<p>
The Redirect directive maps an old URL into a new one. The new URL is
returned
to the client which attempts to fetch it again with the new address.
***************
*** 64,69 ****
--- 64,91 ----
Note: Redirect directives take precedence over Alias and ScriptAlias
directives, irrespective of their ordering in the configuration file.<p>
+ If no <em>status</em> argument is given, the redirect will be
+ "temporary" (HTTP status 302). This indicates to the client that the
+ resources is has moved temporarily. The <em>status</em>
+ argument can be used to return other HTTP status codes:
+ <dl>
+ <dt>permanent<dd>Returns a permanent redirect status (301) indicating that
+ the resource has moved permanently.
+ <dt>temp<dd>Returns a temporary redirect status (302). This is the
+ default.
+ <dt>seeother<dd>Returns a "See Other" status (303) indicating that
+ the resource has been replaced.
+ <dt>gone<dd>Returns a "Gone" status (410) indicating that the resource
+ has been permanently removed. When this status is used the <em>url</em>
+ argument should be omitted.
+ </dl>
+
+ Other status codes can be returned by giving the numeric status code
+ as the value of <em>status</em>. If the status is between 300 and 399,
+ the <em>url</em> argument must be present, otherwise it must be
+ omitted. Note that the status must be known to the Apache code (see
+ the function <code>send_error_response</code> in http_protocol.c).
+
<A name="redirecttemp"><h2>RedirectTemp</h2></A>
<!--%plaintext <?INDEX {\tt Redirect} directive> -->
<strong>Syntax:</strong> RedirectTemp <em>url-path url</em><br>
***************
*** 73,79 ****
<strong>Compatibility:</strong> This directive is only available in 1.2<P>
This directive makes the client know that the Redirect is only
! temporary. (Status 302).<P>
<A name="redirectperm"><h2>RedirectPermanent</h2></A>
<!--%plaintext <?INDEX {\tt Redirect} directive> -->
--- 95,101 ----
<strong>Compatibility:</strong> This directive is only available in 1.2<P>
This directive makes the client know that the Redirect is only
! temporary. (Status 302). Exactly equivalent to <code>Redirect temporary
</code><P>
<A name="redirectperm"><h2>RedirectPermanent</h2></A>
<!--%plaintext <?INDEX {\tt Redirect} directive> -->
***************
*** 84,90 ****
<strong>Compatibility:</strong> This directive is only available in 1.2<P>
This directive makes the client know that the Redirect is permanent.
! (Status 301).<P>
<hr>
<A name="scriptalias"><h2>ScriptAlias</h2></A>
--- 106,112 ----
<strong>Compatibility:</strong> This directive is only available in 1.2<P>
This directive makes the client know that the Redirect is permanent.
! (Status 301). Exactly equivalent to <code>Redirect perm </code><P>
<hr>
<A name="scriptalias"><h2>ScriptAlias</h2></A>