mod_alias.html revision 8427d9c632f123b178313843b8f1c67655807311
45632c3574ce843b9e85b9f73efe75b7b809f789slive<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
6df89e6e4adeb986b41b7ec6b7593a887e031ce7nd BGCOLOR="#FFFFFF"
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim TEXT="#000000"
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim LINK="#0000FF"
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim VLINK="#000080"
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim ALINK="#FF0000"
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<!--#include virtual="header.html" -->
7add1372edb1ee95a2c4d1314df4c7567bda7c62jimThis module is contained in the <CODE>mod_alias.c</CODE> file, and
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndis compiled in by default. It provides for mapping different parts of the
4b5981e276e93df97c34e4da05ca5cf8bbd937dandhost filesystem in the the document tree, and for URL redirection.
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz<!--%plaintext <?INDEX {\tt Alias} directive> -->
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd REL="Help"
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd><STRONG>Syntax:</STRONG></A> Alias <EM>url-path directory-filename</EM><BR>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd HREF="directive-dict.html#Context"
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd REL="Help"
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd><STRONG>Context:</STRONG></A> server config, virtual host<BR>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd REL="Help"
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd REL="Help"
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndThe Alias directive allows documents to be stored in the local filesystem
4af55bbfdbff2cae0cd3195876c93ea991523d1fcolmother than under the <A HREF="core.html#documentroot">DocumentRoot</A>.
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndURLs with a (%-decoded) path beginning with <EM>url-path</EM> will be
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndmapped to local files beginning with <EM>directory-filename</EM>.
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<BLOCKQUOTE><CODE>Alias /image /ftp/pub/image</CODE></BLOCKQUOTE>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndA request for http://myserver/image/foo.gif would cause the server to
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndNote that if you include a trailing / on the <EM>url-path</EM> then the
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndserver will require a trailing / in order to expand the alias. That is,
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndif you use <CODE>Alias /icons/ /usr/local/apache/icons/</CODE> then
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndNote that you may need to specify additional
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<a href="core.html#directory"><code><Directory></code></a> sections
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndwhich cover the <i>destination</i> of aliases. Aliasing occurs
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndbefore <code><Directory></code> sections are checked, so only
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndthe destination of aliases are affected. (Note however
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd<a href="core.html#location"><code><Location></code></a>
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndsections are run through once before aliases are performed, so they
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26ndwill apply.)
29fb68cf24dbdb4985cbb4734cb6074ea4bbab26nd REL="Help"
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd><STRONG>Syntax:</STRONG></A> AliasMatch <EM>regex directory-filename</EM><BR>
ed1d958582984a7c54a6ca859e15939a414fa733nd HREF="directive-dict.html#Context"
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim REL="Help"
7add1372edb1ee95a2c4d1314df4c7567bda7c62jim><STRONG>Context:</STRONG></A> server config, virtual host<BR>
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd REL="Help"
HREF="directive-dict.html#Compatibility"
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
HREF="directive-dict.html#Compatibility"
If the client requests http://myserver/service/foo.txt, it will be told to
access http://foo2.bar.com/service/foo.txt instead.
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
HREF="directive-dict.html#Compatibility"
RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
HREF="directive-dict.html#Compatibility"
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
HREF="directive-dict.html#Compatibility"
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
A request for http://myserver/cgi-bin/foo would cause the server to
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
HREF="directive-dict.html#Compatibility"
<!--#include virtual="footer.html" -->