diff options
Diffstat (limited to 'docs/manual/mod/mod_alias.xml')
-rw-r--r-- | docs/manual/mod/mod_alias.xml | 97 |
1 files changed, 50 insertions, 47 deletions
diff --git a/docs/manual/mod/mod_alias.xml b/docs/manual/mod/mod_alias.xml index 6ed576e621..c8407ad04f 100644 --- a/docs/manual/mod/mod_alias.xml +++ b/docs/manual/mod/mod_alias.xml @@ -35,8 +35,8 @@ href="../urlmapping.html">Mapping URLs to the filesystem</a></seealso> <directivesynopsis> <name>Alias</name> <description>Maps URLs to filesystem locations</description> -<syntax> Alias <em>URL-path - file-path</em>|<em>directory-path</em></syntax> +<syntax>Alias <var>URL-path</var> +<var>file-path</var>|<var>directory-path</var></syntax> <contextlist><context>server config</context><context>virtual host</context> </contextlist> @@ -45,18 +45,18 @@ href="../urlmapping.html">Mapping URLs to the filesystem</a></seealso> <p>The <directive>Alias</directive> directive allows documents to be stored in the local filesystem other than under the <directive module="core">DocumentRoot</directive>. URLs with a - (%-decoded) path beginning with <em>url-path</em> will be mapped - to local files beginning with <em>directory-filename</em>.</p> + (%-decoded) path beginning with <var>url-path</var> will be mapped + to local files beginning with <var>directory-path</var>.</p> - <p>Example:</p> - -<example>Alias /image /ftp/pub/image</example> + <example><title>Example:</title> + Alias /image /ftp/pub/image + </example> <p>A request for http://myserver/image/foo.gif would cause the server to 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 + <var>url-path</var> then the server will require a trailing / in order to expand the alias. That is, if you use <code>Alias /icons/ /usr/local/apache/icons/</code> then the url <code>/icons</code> will not be aliased.</p> @@ -77,8 +77,8 @@ href="../urlmapping.html">Mapping URLs to the filesystem</a></seealso> <name>AliasMatch</name> <description>Maps URLs to filesystem locations using regular expressions</description> -<syntax>AliasMatch <em>regex - file-path</em>|<em>directory-path</em></syntax> +<syntax>AliasMatch <var>regex</var> +<var>file-path</var>|<var>directory-path</var></syntax> <contextlist><context>server config</context><context>virtual host</context> </contextlist> @@ -91,9 +91,10 @@ expressions</description> matches into the given string and use it as a filename. For example, to activate the <code>/icons</code> directory, one might use:</p> -<example> - AliasMatch ^/icons(.*) /usr/local/apache/icons$1 -</example> + + <example> + AliasMatch ^/icons(.*) /usr/local/apache/icons$1 + </example> </usage> </directivesynopsis> @@ -101,7 +102,8 @@ expressions</description> <name>Redirect</name> <description>Sends an external redirect asking the client to fetch a different URL</description> -<syntax>Redirect [<em>status</em>] <em>URL-path URL</em></syntax> +<syntax>Redirect [<var>status</var>] <var>URL-path</var> +<var>URL</var></syntax> <contextlist><context>server config</context><context>virtual host</context> <context>directory</context><context>.htaccess</context></contextlist> <override>FileInfo</override> @@ -109,14 +111,14 @@ a different URL</description> <usage> <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) + again with the new address. <var>URL-path</var> 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>.</p> + with <var>URL</var>.</p> - <p>Example:</p> - -<example>Redirect /service http://foo2.bar.com/service</example> + <example><title>Example:</title> + Redirect /service http://foo2.bar.com/service + </example> <p>If the client requests http://myserver/service/foo.txt, it will be told to access http://foo2.bar.com/service/foo.txt @@ -124,14 +126,14 @@ a different URL</description> <note><title>Note</title> <p>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 +the configuration file. Also, <var>URL-path</var> must be an absolute path, not a relative path, even when used with .htaccess files or inside of <directive type="section" module="core">Directory</directive> sections.</p></note> - <p>If no <em>status</em> argument is given, the redirect will + <p>If no <var>status</var> argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client - that the resource has moved temporarily. The <em>status</em> + that the resource has moved temporarily. The <var>status</var> argument can be used to return other HTTP status codes:</p> <dl> @@ -154,21 +156,19 @@ sections.</p></note> <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.</dd> + used the <var>URL</var> argument should be omitted.</dd> </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, + status code as the value of <var>status</var>. If the status is + between 300 and 399, the <var>URL</var> 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> - <p>Example:</p> - - <example> - Redirect permanent /one http://example.com/two<br /> - Redirect 303 /three http://example.com/other + <example><title>Example:</title> + Redirect permanent /one http://example.com/two<br /> + Redirect 303 /three http://example.com/other </example> </usage> @@ -178,7 +178,8 @@ sections.</p></note> <name>RedirectMatch</name> <description>Sends an external redirect based on a regular expression match of the current URL</description> -<syntax>RedirectMatch [<em>status</em>] <em>regex URL</em></syntax> +<syntax>RedirectMatch [<var>status</var>] <var>regex</var> +<var>URL</var></syntax> <contextlist><context>server config</context><context>virtual host</context> <context>directory</context><context>.htaccess</context></contextlist> <override>FileInfo</override> @@ -192,9 +193,10 @@ of the current URL</description> matches into the given string and use it as a filename. For example, to redirect all GIF files to like-named JPEG files on another server, one might use:</p> -<example> - RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg -</example> + + <example> + RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg + </example> </usage> </directivesynopsis> @@ -202,7 +204,7 @@ of the current URL</description> <name>RedirectTemp</name> <description>Sends an external temporary redirect asking the client to fetch a different URL</description> -<syntax>RedirectTemp <em>URL-path URL</em></syntax> +<syntax>RedirectTemp <var>URL-path</var> <var>URL</var></syntax> <contextlist><context>server config</context><context>virtual host</context> <context>directory</context><context>.htaccess</context></contextlist> <override>FileInfo</override> @@ -218,7 +220,7 @@ a different URL</description> <name>RedirectPermanent</name> <description>Sends an external permanent redirect asking the client to fetch a different URL</description> -<syntax>RedirectPermanent <em>URL-path URL</em></syntax> +<syntax>RedirectPermanent <var>URL-path</var> <var>URL</var></syntax> <contextlist><context>server config</context><context>virtual host</context> <context>directory</context><context>.htaccess</context></contextlist> <override>FileInfo</override> @@ -234,8 +236,8 @@ a different URL</description> <name>ScriptAlias</name> <description>Maps a URL to a filesystem location and designates the target as a CGI script</description> -<syntax>ScriptAlias -<em>URL-path file-path</em>|<em>directory-path</em></syntax> +<syntax>ScriptAlias <var>URL-path</var> +<var>file-path</var>|<var>directory-path</var></syntax> <contextlist><context>server config</context><context>virtual host</context> </contextlist> @@ -245,13 +247,13 @@ target as a CGI script</description> directive, except that in addition it marks the target directory as containing CGI scripts that will be processed by <module >mod_cgi</module>'s cgi-script handler. URLs with a - (%-decoded) path beginning with <em>URL-path</em> will be mapped + (%-decoded) path beginning with <var>URL-path</var> will be mapped to scripts beginning with the second argument which is a full pathname in the local filesystem.</p> - <p>Example:</p> - -<example>ScriptAlias /cgi-bin/ /web/cgi-bin/</example> + <example><title>Example:</title> + ScriptAlias /cgi-bin/ /web/cgi-bin/ + </example> <p>A request for <code>http://myserver/cgi-bin/foo</code> would cause the server to run the script <code>/web/cgi-bin/foo</code>.</p> @@ -262,8 +264,8 @@ target as a CGI script</description> <name>ScriptAliasMatch</name> <description>Maps a URL to a filesystem location using a regular expression and designates the target as a CGI script</description> -<syntax>ScriptAliasMatch -<em>regex file-path</em>|<em>directory-path</em></syntax> +<syntax>ScriptAliasMatch <var>regex</var> +<var>file-path</var>|<var>directory-path</var></syntax> <contextlist><context>server config</context><context>virtual host</context> </contextlist> @@ -276,9 +278,10 @@ and designates the target as a CGI script</description> matches into the given string and use it as a filename. For example, to activate the standard <code>/cgi-bin</code>, one might use:</p> -<example> - ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -</example> + + <example> + ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 + </example> </usage> </directivesynopsis> |