summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_alias.html
diff options
context:
space:
mode:
authorpcs <pcs@unknown>1996-11-27 09:30:51 +0000
committerpcs <pcs@unknown>1996-11-27 09:30:51 +0000
commit5c93e241e43efe9ce294024d993c62e5ba8ba492 (patch)
tree0713da1cd53025445d71547d33c392b6afd15890 /docs/manual/mod/mod_alias.html
parent1ce76e2a419206ca203536aafd4e0cc891ab06ad (diff)
downloadhttpd-5c93e241e43efe9ce294024d993c62e5ba8ba492.tar.gz
Document the "Redirect [ temp | permanent | seeother | gone ] ..." format of
Redirect directive. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@77073 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_alias.html')
-rw-r--r--docs/manual/mod/mod_alias.html30
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 &lt;?INDEX {\tt Redirect} directive&gt; -->
-<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 &lt;?INDEX {\tt Redirect} directive&gt; -->
<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 &lt;?INDEX {\tt Redirect} directive&gt; -->
@@ -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>