diff options
Diffstat (limited to 'docs/manual/mod')
-rw-r--r-- | docs/manual/mod/mod_alias.html | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/docs/manual/mod/mod_alias.html b/docs/manual/mod/mod_alias.html index 118ced8937..7bd28e1648 100644 --- a/docs/manual/mod/mod_alias.html +++ b/docs/manual/mod/mod_alias.html @@ -45,12 +45,12 @@ See also <A HREF="#scriptalias">ScriptAlias</A>.<p><hr> <A name="redirect"><h2>Redirect</h2></A> <!--%plaintext <?INDEX {\tt Redirect} directive> --> -<strong>Syntax:</strong> Redirect <em>url-path url</em><br> +<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<p> +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,6 +64,28 @@ access http://foo2.bar.com/service/foo.txt instead.<p> 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,7 +95,7 @@ directives, irrespective of their ordering in the configuration file.<p> <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> +temporary. (Status 302). Exactly equivalent to <code>Redirect temporary </code><P> <A name="redirectperm"><h2>RedirectPermanent</h2></A> <!--%plaintext <?INDEX {\tt Redirect} directive> --> @@ -84,7 +106,7 @@ temporary. (Status 302).<P> <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> +(Status 301). Exactly equivalent to <code>Redirect perm </code><P> <hr> <A name="scriptalias"><h2>ScriptAlias</h2></A> |