mod_alias.cfile, and is compiled in by default. It provides for mapping different parts of the host filesystem in the the document tree, and for URL redirection.
A request for http://myserver/image/foo.gif would cause the server to return the file /ftp_pub_image_foo.gif.
Alias /image /ftp/pub/image
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/etc/httpd/icons/ then
/icons will not be aliased.
See also ScriptAlias.
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. Example:
If the client requests http://myserver/service/foo.txt, it will be told to access http://foo2.bar.com/service/foo.txt instead.
Redirect /service http://foo2.bar.com/service
Note: Redirect directives take precedence over Alias and ScriptAlias directives, irrespective of their ordering in the configuration file. Also, Url-path must be an absolute path, not a relative path, even when used with .htaccess files or inside of <Directory> sections.
If no status argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client that the resources is has moved temporarily. The status argument can be used to return other HTTP status codes:
This directive makes the client know that the Redirect is only
temporary. (Status 302). Exactly equivalent to
Syntax: RedirectPermanent url-path url
Context: server config, virtual host, directory, .htaccess
Compatibility: This directive is only available in 1.2
This directive makes the client know that the Redirect is permanent.
(Status 301). Exactly equivalent to
A request for http://myserver/cgi-bin/foo would cause the server to run the script /web/cgi-bin/foo.
ScriptAlias /cgi-bin/ /web/cgi-bin/