From: Joshua Slive Date: Fri, 26 Aug 2005 17:54:49 +0000 (+0000) Subject: Make the arguments to the redirect directive clearer. X-Git-Tag: 2.3.0~3064 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a1e45e947ff5a2c1b6c417ea060a9bf8cfd508e;p=thirdparty%2Fapache%2Fhttpd.git Make the arguments to the redirect directive clearer. PR: 36166 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240299 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_alias.html.en b/docs/manual/mod/mod_alias.html.en index c3dbac7e1e0..45573260bda 100644 --- a/docs/manual/mod/mod_alias.html.en +++ b/docs/manual/mod/mod_alias.html.en @@ -193,27 +193,32 @@ a different URL Status:Base Module:mod_alias -

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. URL-path a (%-decoded) - path; any requests for documents beginning with this path will - be returned a redirect error to a new (%-encoded) URL beginning - with URL.

+

The Redirect directive maps an old URL into a new one by asking + the client to refetch the resource at the new location.

+ +

The old URL-path is a (%-decoded) path beginning with + a slash. A relative path is not allowed. The new URL + should be an absolute URL beginning with a scheme and hostname, + but a URL-path beginning with a slash may also be used, in which + case the scheme and hostname of the current server will be + added.

+ +

Then any request beginning with URL-Path will return a + redirect request to the client at the location of the target + URL. Additional path information beyond the matched + URL-Path will be appended to the target URL.

Example:

- Redirect /service http://foo2.bar.com/service + Redirect /service http://foo2.example.com/service

-

If the client requests http://myserver/service/foo.txt, it - will be told to access http://foo2.bar.com/service/foo.txt +

If the client requests http://example.com/service/foo.txt, it + will be told to access http://foo2.example.com/service/foo.txt instead.

Note

Redirect directives take precedence over Alias and ScriptAlias directives, irrespective of their ordering in -the configuration file. Also, URL-path must be a fully -qualified URL, not a relative path, even when used with .htaccess files or -inside of <Directory> -sections.

+the configuration file.

If no status argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client diff --git a/docs/manual/mod/mod_alias.xml b/docs/manual/mod/mod_alias.xml index 7bd327bbb4b..2bcb910282c 100644 --- a/docs/manual/mod/mod_alias.xml +++ b/docs/manual/mod/mod_alias.xml @@ -184,27 +184,32 @@ a different URL FileInfo -

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. URL-path a (%-decoded) - path; any requests for documents beginning with this path will - be returned a redirect error to a new (%-encoded) URL beginning - with URL.

+

The Redirect directive maps an old URL into a new one by asking + the client to refetch the resource at the new location.

+ +

The old URL-path is a (%-decoded) path beginning with + a slash. A relative path is not allowed. The new URL + should be an absolute URL beginning with a scheme and hostname, + but a URL-path beginning with a slash may also be used, in which + case the scheme and hostname of the current server will be + added.

+ +

Then any request beginning with URL-Path will return a + redirect request to the client at the location of the target + URL. Additional path information beyond the matched + URL-Path will be appended to the target URL.

Example: - Redirect /service http://foo2.bar.com/service + Redirect /service http://foo2.example.com/service -

If the client requests http://myserver/service/foo.txt, it - will be told to access http://foo2.bar.com/service/foo.txt +

If the client requests http://example.com/service/foo.txt, it + will be told to access http://foo2.example.com/service/foo.txt instead.

Note

Redirect directives take precedence over Alias and ScriptAlias directives, irrespective of their ordering in -the configuration file. Also, URL-path must be a fully -qualified URL, not a relative path, even when used with .htaccess files or -inside of Directory -sections.

+the configuration file.

If no status argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client