From: Nilgun Belma Buguner 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 First, all Redirects are processed before Aliases are processed,
-and therefore a request that matches a 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: But if the above two directives were reversed in order, the
- 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 First, all Redirects are processed before Aliases are processed,
+ and therefore a request that matches a 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: But if the above two directives were reversed in order, the
+
-Alias /foo /gaq
-/foo
/foo/bar
+ Alias /foo /gaq
+ /foo
/foo/bar
The
A request for http://myserver/image/foo.gif would cause the - server to return the file /ftp/pub/image/foo.gif.
+A request for http://myserver/image/foo.gif
would cause
+ the server to return the file /ftp/pub/image/foo.gif
.
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.
Alias /icons/ /usr/local/apache/icons/
then the url /icons
will not be aliased.
Note that you may need to specify additional
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 case-sensitive (%-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 @@ -206,16 +208,17 @@ a different URL Redirect /service http://foo2.bar.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://myserver/service/foo.txt
, it
+ will be told to access http://foo2.bar.com/service/foo.txt
instead.
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
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
If no status argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client @@ -262,7 +265,7 @@ sections.