From: Nilgun Belma Buguner Date: Sat, 19 Jul 2008 04:48:27 +0000 (+0000) Subject: some cosmetic improvements X-Git-Tag: 2.3.0~425 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fbc99da80aba7bbab2bf1925d4ddf3822f98a73;p=apache some cosmetic improvements git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@678097 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_alias.xml b/docs/manual/mod/mod_alias.xml index 87f7b25df3..1afe5856ea 100644 --- a/docs/manual/mod/mod_alias.xml +++ b/docs/manual/mod/mod_alias.xml @@ -59,36 +59,36 @@ href="../urlmapping.html">Mapping URLs to the filesystem
Order of Processing -

Aliases and Redirects occuring in different contexts are processed -like other directives according to standard merging rules. But when multiple -Aliases or Redirects occur in the same context (for example, in the -same VirtualHost -section) they are processed in a particular order.

- -

First, all Redirects are processed before Aliases are processed, -and therefore a request that matches a Redirect or RedirectMatch will never have Aliases -applied. Second, the Aliases and Redirects are processed in the order -they appear in the configuration files, with the first match taking -precedence.

- -

For this reason, when two or more of these directives apply to the -same sub-path, you must list the most specific path first in order for -all the directives to have an effect. For example, the following -configuration will work as expected:

- - -Alias /foo/bar /baz
-Alias /foo /gaq -
- -

But if the above two directives were reversed in order, the -/foo Alias -would always match before the /foo/bar Alias, so the latter directive would be -ignored.

+

Aliases and Redirects occuring in different contexts are processed + like other directives according to standard merging rules. But when multiple + Aliases or Redirects occur in the same context (for example, in the + same VirtualHost + section) they are processed in a particular order.

+ +

First, all Redirects are processed before Aliases are processed, + and therefore a request that matches a Redirect or RedirectMatch will never have Aliases + applied. Second, the Aliases and Redirects are processed in the order + they appear in the configuration files, with the first match taking + precedence.

+ +

For this reason, when two or more of these directives apply to the + same sub-path, you must list the most specific path first in order for + all the directives to have an effect. For example, the following + configuration will work as expected:

+ + + Alias /foo/bar /baz
+ Alias /foo /gaq +
+ +

But if the above two directives were reversed in order, the + /foo Alias + would always match before the /foo/bar Alias, so the latter directive would be + ignored.

@@ -103,29 +103,31 @@ ignored.

The Alias directive allows documents to - be stored in the local filesystem other than under the + be stored in the local filesystem other than under the DocumentRoot. URLs with a (%-decoded) path beginning with url-path will be mapped - to local files beginning with directory-path. The - url-path is case-sensitive, even on case-insensitive + to local files beginning with directory-path. The + url-path is case-sensitive, even on case-insensitive file systems.

Example: Alias /image /ftp/pub/image -

A request for http://myserver/image/foo.gif would cause the - server to return the file /ftp/pub/image/foo.gif. Only complete - path segments are matched, so the above alias would not match a - request for http://myserver/imagefoo.gif. For more complex - matching using regular expressions, see the AliasMatch directive.

+

A request for http://myserver/image/foo.gif would cause + the server to return the file /ftp/pub/image/foo.gif. Only + complete path segments are matched, so the above alias would not match a + request for http://myserver/imagefoo.gif. For more complex + matching using regular expressions, see the AliasMatch directive.

Note that if you include a trailing / on the url-path then the server will require a trailing / in - order to expand the alias. That is, if you use Alias - /icons/ /usr/local/apache/icons/ then the url - /icons will not be aliased.

+ order to expand the alias. That is, if you use

+ +
Alias /icons/ /usr/local/apache/icons/
+ +

then the url /icons will not be aliased.

Note that you may need to specify additional Directory sections which @@ -156,7 +158,7 @@ ignored.

AliasMatch -Maps URLs to filesystem locations using regular +Maps URLs to filesystem locations using regular expressions AliasMatch regex file-path|directory-path @@ -165,8 +167,8 @@ expressions

This directive is equivalent to Alias, but makes use of - regular expressions, + module="mod_alias">Alias, but makes use of + regular expressions, instead of simple prefix matching. The supplied regular expression is matched against the URL-path, and if it matches, the server will substitute any parenthesized @@ -218,18 +220,20 @@ a different URL Redirect /service http://foo2.example.com/service -

If the client requests http://example.com/service/foo.txt, it - will be told to access http://foo2.example.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. Only complete path segments are matched, so the above example would not match a request for - http://example.com/servicefoo.txt. For more complex matching + http://example.com/servicefoo.txt. For more complex matching using regular expressions, see the RedirectMatch directive.

-Note

Redirect directives take precedence over -Alias and ScriptAlias directives, irrespective of their ordering in -the configuration file.

+ Note +

Redirect directives take precedence over Alias and ScriptAlias + directives, irrespective of their ordering in the configuration + file.

If no status argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client @@ -276,7 +280,7 @@ the configuration file.

RedirectMatch -Sends an external redirect based on a regular expression match +Sends an external redirect based on a regular expression match of the current URL RedirectMatch [status] regex URL @@ -286,8 +290,8 @@ of the current URL

This directive is equivalent to Redirect, but makes use of - regular expressions, + module="mod_alias">Redirect, but makes use of + regular expressions, instead of simple prefix matching. The supplied regular expression is matched against the URL-path, and if it matches, the server will substitute any parenthesized @@ -392,7 +396,7 @@ target as a CGI script This is necessary since multiple URL-paths can map to the same filesystem location, potentially bypassing the ScriptAlias and revealing the source code - of the CGI scripts if they are not restricted by a + of the CGI scripts if they are not restricted by a Directory section. @@ -410,8 +414,8 @@ and designates the target as a CGI script

This directive is equivalent to ScriptAlias, but makes use of - regular expressions, + >ScriptAlias, but makes use of + regular expressions, instead of simple prefix matching. The supplied regular expression is matched against the URL-path, and if it matches, the server will substitute any parenthesized