summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_alias.html.en
diff options
context:
space:
mode:
authorKen Coar <coar@apache.org>2015-04-14 22:19:49 +0000
committerKen Coar <coar@apache.org>2015-04-14 22:19:49 +0000
commit09adb8097877afcc689379b09687878c78183587 (patch)
tree297918b719682f049ac8e0f557f76c0c0db10b6d /docs/manual/mod/mod_alias.html.en
parenta388b842278920701ab164f78423e7239c2ff84b (diff)
downloadhttpd-09adb8097877afcc689379b09687878c78183587.tar.gz
Build..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1673568 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_alias.html.en')
-rw-r--r--docs/manual/mod/mod_alias.html.en88
1 files changed, 44 insertions, 44 deletions
diff --git a/docs/manual/mod/mod_alias.html.en b/docs/manual/mod/mod_alias.html.en
index a4c076ae28..c4f84f6822 100644
--- a/docs/manual/mod/mod_alias.html.en
+++ b/docs/manual/mod/mod_alias.html.en
@@ -52,7 +52,7 @@
a new location.</p>
<p>When the <code class="directive"><a href="#alias">Alias</a></code>,
- <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> and
+ <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> and
<code class="directive"><a href="#redirect">Redirect</a></code> directives are used
within a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>
or <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code>
@@ -106,8 +106,8 @@
all the directives to have an effect. For example, the following
configuration will work as expected:</p>
- <pre class="prettyprint lang-config">Alias /foo/bar /baz
-Alias /foo /gaq</pre>
+ <pre class="prettyprint lang-config">Alias "/foo/bar" "/baz"
+Alias "/foo" "/gaq"</pre>
<p>But if the above two directives were reversed in order, the
@@ -116,13 +116,13 @@ Alias /foo /gaq</pre>
ignored.</p>
<p>When the <code class="directive"><a href="#alias">Alias</a></code>,
- <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> and
+ <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> and
<code class="directive"><a href="#redirect">Redirect</a></code> directives are used
within a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>
or <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code>
section, these directives will take precedence over any globally
defined <code class="directive"><a href="#alias">Alias</a></code>,
- <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> and
+ <code class="directive"><a href="#scriptalias">ScriptAlias</a></code> and
<code class="directive"><a href="#redirect">Redirect</a></code> directives.</p>
</div>
@@ -145,7 +145,7 @@ Alias /foo /gaq</pre>
<var>URL-path</var> is case-sensitive, even on case-insensitive
file systems.</p>
- <pre class="prettyprint lang-config">Alias /image /ftp/pub/image</pre>
+ <pre class="prettyprint lang-config">Alias "/image" "/ftp/pub/image"</pre>
<p>A request for <code>http://example.com/image/foo.gif</code> would cause
@@ -158,10 +158,10 @@ Alias /foo /gaq</pre>
<var>URL-path</var> then the server will require a trailing / in
order to expand the alias. That is, if you use</p>
- <pre class="prettyprint lang-config">Alias /icons/ /usr/local/apache/icons/</pre>
+ <pre class="prettyprint lang-config">Alias "/icons/" "/usr/local/apache/icons/"</pre>
- <p>then the url <code>/icons</code> will not be aliased, as it lacks
+ <p>then the URL <code>/icons</code> will not be aliased, as it lacks
that trailing /. Likewise, if you omit the slash on the
<var>URL-path</var> then you must also omit it from the
<var>file-path</var>.</p>
@@ -178,13 +178,13 @@ Alias /foo /gaq</pre>
directory outside of your <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>, you may need to explicitly
permit access to the target directory.</p>
- <pre class="prettyprint lang-config">Alias /image /ftp/pub/image
-&lt;Directory /ftp/pub/image&gt;
+ <pre class="prettyprint lang-config">Alias "/image" "/ftp/pub/image"
+&lt;Directory "/ftp/pub/image"&gt;
Require all granted
&lt;/Directory&gt;</pre>
- <p>Any number slashes in the <var>URL-path</var> parameter
+ <p>Any number slashes in the <var>URL-path</var> parameter
matches any number of slashes in the requested URL-path.</p>
<p>If the <code class="directive">Alias</code> directive is used within a
@@ -193,11 +193,11 @@ Alias /foo /gaq</pre>
section the URL-path is omitted, and the file-path is interpreted
using <a href="../expr.html">expression syntax</a>.</p>
- <pre class="prettyprint lang-config">&lt;Location /image&gt;
- Alias /ftp/pub/image
+ <pre class="prettyprint lang-config">&lt;Location "/image"&gt;
+ Alias "/ftp/pub/image"
&lt;/Location&gt;
-&lt;LocationMatch /error/(?&lt;NUMBER&gt;[0-9]+)&gt;
- Alias /usr/local/apache/errors/%{env:MATCH_NUMBER}.html
+&lt;LocationMatch "/error/(?&lt;NUMBER&gt;[0-9]+)"&gt;
+ Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html"
&lt;/LocationMatch&gt;</pre>
@@ -223,7 +223,7 @@ expressions</td></tr>
example, to activate the <code>/icons</code> directory, one might
use:</p>
- <pre class="prettyprint lang-config">AliasMatch ^/icons(/|$)(.*) /usr/local/apache/icons$1$2</pre>
+ <pre class="prettyprint lang-config">AliasMatch "^/icons(/|$)(.*)" "/usr/local/apache/icons$1$2"</pre>
<p>The full range of <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
@@ -231,7 +231,7 @@ expressions</td></tr>
it is possible to construct an alias with case-insensitive
matching of the URL-path:</p>
- <pre class="prettyprint lang-config">AliasMatch (?i)^/image(.*) /ftp/pub/image$1</pre>
+ <pre class="prettyprint lang-config">AliasMatch "(?i)^/image(.*)" "/ftp/pub/image$1"</pre>
<p>One subtle difference
@@ -255,18 +255,18 @@ expressions</td></tr>
<p>For example, suppose you want to replace this with AliasMatch:</p>
- <pre class="prettyprint lang-config">Alias /image/ /ftp/pub/image/</pre>
+ <pre class="prettyprint lang-config">Alias "/image/" "/ftp/pub/image/"</pre>
<p>This is NOT equivalent - don't do this! This will send all
requests that have /image/ anywhere in them to /ftp/pub/image/:</p>
- <pre class="prettyprint lang-config">AliasMatch /image/ /ftp/pub/image/</pre>
+ <pre class="prettyprint lang-config">AliasMatch "/image/" "/ftp/pub/image/"</pre>
<p>This is what you need to get the same effect:</p>
- <pre class="prettyprint lang-config">AliasMatch ^/image/(.*)$ /ftp/pub/image/$1</pre>
+ <pre class="prettyprint lang-config">AliasMatch "^/image/(.*)$" "/ftp/pub/image/$1"</pre>
<p>Of course, there's no point in
@@ -276,8 +276,8 @@ expressions</td></tr>
you do more complicated things. For example, you could
serve different kinds of files from different directories:</p>
- <pre class="prettyprint lang-config"> AliasMatch ^/image/(.*)\.jpg$ /files/jpg.images/$1.jpg<br />
- AliasMatch ^/image/(.*)\.gif$ /files/gif.images/$1.gif</pre>
+ <pre class="prettyprint lang-config"> AliasMatch "^/image/(.*)\.jpg$" "/files/jpg.images/$1.jpg"<br />
+ AliasMatch "^/image/(.*)\.gif$" "/files/gif.images/$1.gif"</pre>
<p>Multiple leading slashes in the requested URL are discarded
@@ -316,10 +316,10 @@ a different URL</td></tr>
<em>URL-Path</em> will be appended to the target URL.</p>
<pre class="prettyprint lang-config"># Redirect to a URL on a different host
-Redirect /service http://foo2.example.com/service
+Redirect "/service" "http://foo2.example.com/service"
# Redirect to a URL on the same host
-Redirect /one /two</pre>
+Redirect "/one" "/two"</pre>
<p>If the client requests <code>http://example.com/service/foo.txt</code>,
@@ -380,8 +380,8 @@ Redirect /one /two</pre>
HTTP status code, known to the Apache HTTP Server (see the function
<code>send_error_response</code> in http_protocol.c).</p>
- <pre class="prettyprint lang-config">Redirect permanent /one http://example.com/two
-Redirect 303 /three http://example.com/other</pre>
+ <pre class="prettyprint lang-config">Redirect permanent "/one" "http://example.com/two"
+Redirect 303 "/three" "http://example.com/other"</pre>
<p>If the <code class="directive">Redirect</code> directive is used within a
@@ -390,14 +390,14 @@ Redirect 303 /three http://example.com/other</pre>
section with the URL-path omitted, then the URL parameter will be
interpreted using <a href="../expr.html">expression syntax</a>.</p>
- <pre class="prettyprint lang-config">&lt;Location /one&gt;
- Redirect permanent http://example.com/two
+ <pre class="prettyprint lang-config">&lt;Location "/one"&gt;
+ Redirect permanent "http://example.com/two"
&lt;/Location&gt;<br />
-&lt;Location /three&gt;
- Redirect 303 http://example.com/other
+&lt;Location "/three"&gt;
+ Redirect 303 "http://example.com/other"
&lt;/Location&gt;<br />
-&lt;LocationMatch /error/(?&lt;NUMBER&gt;[0-9]+)&gt;
- Redirect permanent http://example.com/errors/%{env:MATCH_NUMBER}.html
+&lt;LocationMatch "/error/(?&lt;NUMBER&gt;[0-9]+)"&gt;
+ Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html"
&lt;/LocationMatch&gt;<br />
</pre>
@@ -425,7 +425,7 @@ of the current URL</td></tr>
example, to redirect all GIF files to like-named JPEG files on
another server, one might use:</p>
- <pre class="prettyprint lang-config">RedirectMatch (.*)\.gif$ http://other.example.com$1.jpg</pre>
+ <pre class="prettyprint lang-config">RedirectMatch "(.*)\.gif$" "http://other.example.com$1.jpg"</pre>
<p>The considerations related to the difference between
@@ -491,14 +491,14 @@ target as a CGI script</td></tr>
to scripts beginning with the second argument, which is a full
pathname in the local filesystem.</p>
- <pre class="prettyprint lang-config">ScriptAlias /cgi-bin/ /web/cgi-bin/</pre>
+ <pre class="prettyprint lang-config">ScriptAlias "/cgi-bin/" "/web/cgi-bin/"</pre>
<p>A request for <code>http://example.com/cgi-bin/foo</code> would cause the
server to run the script <code>/web/cgi-bin/foo</code>. This configuration
is essentially equivalent to:</p>
- <pre class="prettyprint lang-config">Alias /cgi-bin/ /web/cgi-bin/
-&lt;Location /cgi-bin &gt;
+ <pre class="prettyprint lang-config">Alias "/cgi-bin/" "/web/cgi-bin/"
+&lt;Location "/cgi-bin" &gt;
SetHandler cgi-script
Options +ExecCGI
&lt;/Location&gt;</pre>
@@ -507,7 +507,7 @@ target as a CGI script</td></tr>
<p><code class="directive">ScriptAlias</code> can also be used in conjunction with
a script or handler you have. For example:</p>
- <pre class="prettyprint lang-config">ScriptAlias /cgi-bin/ /web/cgi-handler.pl</pre>
+ <pre class="prettyprint lang-config">ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl"</pre>
<p>In this scenario all files requested in <code>/cgi-bin/</code> will be
@@ -524,7 +524,7 @@ target as a CGI script</td></tr>
choose to place your CGI scripts in a directory already
accessible from the web, do not use
<code class="directive">ScriptAlias</code>. Instead, use <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code>, <code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code>, and <code class="directive"><a href="../mod/core.html#options">Options</a></code> as in:
- <pre class="prettyprint lang-config">&lt;Directory /usr/local/apache2/htdocs/cgi-bin &gt;
+ <pre class="prettyprint lang-config">&lt;Directory "/usr/local/apache2/htdocs/cgi-bin"&gt;
SetHandler cgi-script
Options ExecCGI
&lt;/Directory&gt;</pre>
@@ -541,11 +541,11 @@ target as a CGI script</td></tr>
section with the URL-path omitted, then the URL parameter will be
interpreted using <a href="../expr.html">expression syntax</a>.</p>
- <pre class="prettyprint lang-config">&lt;Location /cgi-bin &gt;
- ScriptAlias /web/cgi-bin/
+ <pre class="prettyprint lang-config">&lt;Location "/cgi-bin"&gt;
+ ScriptAlias "/web/cgi-bin/"
&lt;/Location&gt;
-&lt;LocationMatch /cgi-bin/errors/(?&lt;NUMBER&gt;[0-9]+)&gt;
- ScriptAlias /web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi
+&lt;LocationMatch "/cgi-bin/errors/(?&lt;NUMBER&gt;[0-9]+)"&gt;
+ ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi"
&lt;/LocationMatch&gt;<br />
</pre>
@@ -576,7 +576,7 @@ and designates the target as a CGI script</td></tr>
example, to activate the standard <code>/cgi-bin</code>, one
might use:</p>
- <pre class="prettyprint lang-config">ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1</pre>
+ <pre class="prettyprint lang-config">ScriptAliasMatch "^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"</pre>
<p>As for AliasMatch, the full range of <a class="glossarylink" href="../glossary.html#rexex" title="see glossary">regular
@@ -584,7 +584,7 @@ and designates the target as a CGI script</td></tr>
For example, it is possible to construct an alias with case-insensitive
matching of the URL-path:</p>
- <pre class="prettyprint lang-config">ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1</pre>
+ <pre class="prettyprint lang-config">ScriptAliasMatch "(?i)^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"</pre>
<p>The considerations related to the difference between