diff options
author | Ken Coar <coar@apache.org> | 1997-07-06 19:19:19 +0200 |
---|---|---|
committer | Ken Coar <coar@apache.org> | 1997-07-06 19:19:19 +0200 |
commit | 87226ebeb806ec2a617bcb4cad5a8132f61d4288 (patch) | |
tree | 95a0894cadc66264033bcdfb132d6e1293640d8f /docs/manual/mod/mod_alias.html | |
parent | Numerous HTML cleanups, largely courtesy of weblint (thanx, (diff) | |
download | apache2-87226ebeb806ec2a617bcb4cad5a8132f61d4288.tar.xz apache2-87226ebeb806ec2a617bcb4cad5a8132f61d4288.zip |
More HTML cleanups, retrofit of intentional <XA> tag to a no-op
<A NAME> (thanks, Marc). Lots of trailing blanks removed throughout.
Small addition to the new_features_1_3 page. Plenty of
cleanup still to come..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@78545 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_alias.html')
-rw-r--r-- | docs/manual/mod/mod_alias.html | 127 |
1 files changed, 84 insertions, 43 deletions
diff --git a/docs/manual/mod/mod_alias.html b/docs/manual/mod/mod_alias.html index c5c89250e3..445c5942f0 100644 --- a/docs/manual/mod/mod_alias.html +++ b/docs/manual/mod/mod_alias.html @@ -15,132 +15,173 @@ <!--#include virtual="header.html" --> <H1 ALIGN="CENTER">Module mod_alias</h1> - +<P> This module is contained in the <code>mod_alias.c</code> file, 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. +</P> - -<menu> +<H2>Directives</H2> +<UL> <li><A HREF="#alias">Alias</A> <li><A HREF="#redirect">Redirect</A> <li><A HREF="#redirecttemp">RedirectTemp</A> <li><A HREF="#redirectperm">RedirectPermanent</A> <li><A HREF="#scriptalias">ScriptAlias</A> -</menu> +</UL> <hr> -<A name="alias"><h2>Alias</h2></A> +<h2><A name="alias">Alias directive</A></h2> +<P> <!--%plaintext <?INDEX {\tt Alias} directive> --> <strong>Syntax:</strong> Alias <em>url-path directory-filename</em><br> <Strong>Context:</strong> server config, virtual host<br> <strong>Status:</strong> Base<br> -<strong>Module:</strong> mod_alias<br> - +<strong>Module:</strong> mod_alias +</P> +<P> The Alias directive allows documents to be stored in the local filesystem other than under the <A HREF="core.html#documentroot">DocumentRoot</A>. URLs with a (%-decoded) path beginning with <em>url-path</em> will be mapped to local files beginning with <em>directory-filename</em>. +<P> Example: +</P> <blockquote><code>Alias /image /ftp/pub/image</code></blockquote> +<P> A request for http://myserver/image/foo.gif would cause the server to -return the file /ftp/pub/image/foo.gif.<p> - +return the file /ftp/pub/image/foo.gif. +</p> +<P> Note that if you include a trailing / on the <em>url-path</em> then the server will require a trailing / in order to expand the alias. That is, if you use <code>Alias /icons/ /usr/local/etc/httpd/icons/</code> then -the url <code>/icons</code> will not be aliased.<p> - -See also <A HREF="#scriptalias">ScriptAlias</A>.<p><hr> +the url <code>/icons</code> will not be aliased. +</p> +<P> +See also <A HREF="#scriptalias">ScriptAlias</A>. +</p> +<hr> -<A name="redirect"><h2>Redirect</h2></A> +<h2><A name="redirect">Redirect directive</A></h2> +<P> <!--%plaintext <?INDEX {\tt Redirect} directive> --> <strong>Syntax:</strong> Redirect [ <em>status</em> ] <em>url-path url</em><br> <Strong>Context:</strong> server config, virtual host, directory, .htaccess<br> <strong>Status:</strong> Base<br> <strong>Module:</strong> mod_alias<br> <strong>Compatibility:</strong> The directory and .htaccess context's -are only available in versions 1.1 and later. The <em>status</em> argument is only available in Apache 1.2 or later.<p> - +are only available in versions 1.1 and later. The <em>status</em> +argument is only available in Apache 1.2 or later. +</P> +<P> 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. <em>Url-path</em> a (%-decoded) path; any requests for documents beginning with this path will be returned a redirect error to a new (%-encoded) url -beginning with <em>url</em>. Example: +beginning with <em>url</em>. +</P> +<P> +Example: +</P> <blockquote><code>Redirect /service http://foo2.bar.com/service</code></blockquote> +<P> If the client requests http://myserver/service/foo.txt, it will be told to -access http://foo2.bar.com/service/foo.txt instead.<p> - -Note: Redirect directives take precedence over Alias and ScriptAlias +access http://foo2.bar.com/service/foo.txt instead. +</p> +<P> +<STRONG>Note:</STRONG> Redirect directives take precedence over Alias +and ScriptAlias directives, irrespective of their ordering in the configuration file. Also, -<em>Url-path</em> must be an absolute path, not a relative path, even when used with -.htaccess files or inside of <Directory> sections.<p> - +<em>Url-path</em> must be an absolute path, not a relative path, even +when used with .htaccess files or inside of <Directory> sections. +</p> +<P> If no <em>status</em> argument is given, the redirect will be -"temporary" (HTTP status 302). This indicates to the client that the +"temporary" (HTTP status 302). This indicates to the client that the resources is has moved temporarily. The <em>status</em> argument can be used to return other HTTP status codes: +<P> <dl> -<dt>permanent<dd>Returns a permanent redirect status (301) indicating that +<dt>permanent +<dd>Returns a permanent redirect status (301) indicating that the resource has moved permanently. -<dt>temp<dd>Returns a temporary redirect status (302). This is the +<dt>temp +<dd>Returns a temporary redirect status (302). This is the default. -<dt>seeother<dd>Returns a "See Other" status (303) indicating that +<dt>seeother +<dd>Returns a "See Other" status (303) indicating that the resource has been replaced. -<dt>gone<dd>Returns a "Gone" status (410) indicating that the resource +<dt>gone +<dd>Returns a "Gone" status (410) indicating that the resource has been permanently removed. When this status is used the <em>url</em> argument should be omitted. </dl> - +<P> Other status codes can be returned by giving the numeric status code as the value of <em>status</em>. If the status is between 300 and 399, the <em>url</em> argument must be present, otherwise it must be omitted. Note that the status must be known to the Apache code (see the function <code>send_error_response</code> in http_protocol.c). +</P> +<HR> -<A name="redirecttemp"><h2>RedirectTemp</h2></A> +<h2><A name="redirecttemp">RedirectTemp directive</A></h2> +<P> <!--%plaintext <?INDEX {\tt Redirect} directive> --> <strong>Syntax:</strong> RedirectTemp <em>url-path url</em><br> <Strong>Context:</strong> server config, virtual host, directory, .htaccess<br> <strong>Status:</strong> Base<br> <strong>Module:</strong> mod_alias<br> -<strong>Compatibility:</strong> This directive is only available in 1.2<P> - +<strong>Compatibility:</strong> This directive is only available in 1.2 +</P> +<P> This directive makes the client know that the Redirect is only -temporary. (Status 302). Exactly equivalent to <code>Redirect temporary </code><P> +temporary (status 302). Exactly equivalent to <code>Redirect +temporary</code>. +</P> +<HR> -<A name="redirectperm"><h2>RedirectPermanent</h2></A> +<h2><A name="redirectperm">RedirectPermanent directive</A></h2> +<P> <!--%plaintext <?INDEX {\tt Redirect} directive> --> <strong>Syntax:</strong> RedirectPermanent <em>url-path url</em><br> <Strong>Context:</strong> server config, virtual host, directory, .htaccess<br> <strong>Status:</strong> Base<br> <strong>Module:</strong> mod_alias<br> -<strong>Compatibility:</strong> This directive is only available in 1.2<P> - -This directive makes the client know that the Redirect is permanent. -(Status 301). Exactly equivalent to <code>Redirect permanent</code><P> - +<strong>Compatibility:</strong> This directive is only available in 1.2 +</P> +<P> +This directive makes the client know that the Redirect is permanent +(status 301). Exactly equivalent to <code>Redirect permanent</code>. +</P> <hr> -<A name="scriptalias"><h2>ScriptAlias</h2></A> + +<h2><A name="scriptalias">ScriptAlias directive</A></h2> +<P> <!--%plaintext <?INDEX {\tt ScriptAlias} directive> --> <strong>Syntax:</strong> ScriptAlias <em>url-path directory-filename</em><br> <Strong>Context:</strong> server config, virtual host<br> <strong>Status:</strong> Base<br> -<strong>Module:</strong> mod_alias<br> - +<strong>Module:</strong> mod_alias +</P> +<P> The ScriptAlias directive has the same behavior as the <A HREF="#alias">Alias</A> directive, except that in addition it marks the target directory as containing CGI scripts. URLs with a (%-decoded) path beginning with <em>url-path</em> will be mapped to scripts beginning with <em>directory-filename</em>. +<P> Example: +</P> <blockquote><code>ScriptAlias /cgi-bin/ /web/cgi-bin/</code></blockquote> +<P> A request for http://myserver/cgi-bin/foo would cause the server to -run the script /web/cgi-bin/foo.<p> +run the script /web/cgi-bin/foo. +</P> <!--#include virtual="footer.html" --> </BODY> </HTML> - |