be stored in the local filesystem other than under the
<code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>. URLs with a
(%-decoded) path beginning with <var>url-path</var> will be mapped
- to local files beginning with <var>directory-path</var>.</p>
+ to local files beginning with <var>directory-path</var>. The
+ <var>url-path</var> is case-sensitive, even on case-insenitive
+ file systems.</p>
<div class="example"><h3>Example:</h3><p><code>
Alias /image /ftp/pub/image
AliasMatch ^/icons(.*) /usr/local/apache/icons$1
</code></p></div>
+ <p>It is also possible to construct an alias with case-insensitive
+ matching of the url-path:</p>
+
+ <div class="example"><p><code>
+ AliasMatch (?i)^/image(.*) /ftp/pub/image$1
+ </code></p></div>
+
+
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Redirect" id="Redirect">Redirect</a> <a name="redirect" id="redirect">Directive</a></h2>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_alias</td></tr>
</table>
- <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. <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 <var>URL</var>.</p>
+ <p>The Redirect directive maps an old URL into a new one by asking
+ the client to refetch the resource at the new location.</p>
+
+ <p>The old <em>URL-path</em> is a case-sensitive (%-decoded) path
+ beginning with a slash. A relative path is not allowed. The new
+ <em>URL</em> should be an absolute URL beginning with a scheme and
+ hostname, but a URL-path beginning with a slash may also be used,
+ in which case the scheme and hostname of the current server will
+ be added.</p>
<div class="example"><h3>Example:</h3><p><code>
Redirect /service http://foo2.bar.com/service
<p>The <code class="directive">ScriptAlias</code> directive has the same
behavior as the <code class="directive"><a href="#alias">Alias</a></code>
directive, except that in addition it marks the target directory
- as containing CGI scripts that will be processed by <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>'s cgi-script handler. URLs with a
+ as containing CGI scripts that will be processed by <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>'s cgi-script handler. URLs with a case-sensitive
(%-decoded) path beginning with <var>URL-path</var> will be mapped
- to scripts beginning with the second argument which is a full
+ to scripts beginning with the second argument, which is a full
pathname in the local filesystem.</p>
<div class="example"><h3>Example:</h3><p><code>
</code></p></div>
<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>
+ server to run the script <code>/web/cgi-bin/foo</code>. This configuration
+ is essentially equivalent to:</p>
+ <div class="example"><p><code>
+ Alias /cgi-bin/ /web/cgi-bin/<br />
+ <Directory /web/cgi-bin ><br />
+ <span class="indent">
+ SetHandler cgi-script<br />
+ Options +ExecCGI<br />
+ </span>
+ </Directory>
+ </code></p></div>
+ <div class="note">It is safer to avoid placing CGI scripts under the
+ <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> in order to
+ avoid accidentally revealing their source code if the
+ configuration is ever changed. The
+ <code class="directive">ScriptAlias</code> makes this easy by mapping a
+ URL and designating CGI scripts at the same time. If you do
+ 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"><Directory></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 shown in the second example
+ above.</div>
+
+
+<h3>See also</h3>
+<ul>
+<li><a href="../howto/cgi.html">CGI Tutorial</a></li>
+</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ScriptAliasMatch" id="ScriptAliasMatch">ScriptAliasMatch</a> <a name="scriptaliasmatch" id="scriptaliasmatch">Directive</a></h2>
<a href="../ja/mod/mod_alias.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/mod/mod_alias.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
-<p class="apache">Copyright 2006 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
+<p class="apache">Copyright 1995-2005 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
</body></html>
\ No newline at end of file
be stored in the local filesystem other than under the
<directive module="core">DocumentRoot</directive>. URLs with a
(%-decoded) path beginning with <var>url-path</var> will be mapped
- to local files beginning with <var>directory-path</var>.</p>
+ to local files beginning with <var>directory-path</var>. The
+ <var>url-path</var> is case-sensitive, even on case-insenitive
+ file systems.</p>
<example><title>Example:</title>
Alias /image /ftp/pub/image
<example>
AliasMatch ^/icons(.*) /usr/local/apache/icons$1
</example>
+
+ <p>It is also possible to construct an alias with case-insensitive
+ matching of the url-path:</p>
+
+ <example>
+ AliasMatch (?i)^/image(.*) /ftp/pub/image$1
+ </example>
+
</usage>
</directivesynopsis>
<override>FileInfo</override>
<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. <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 <var>URL</var>.</p>
+ <p>The Redirect directive maps an old URL into a new one by asking
+ the client to refetch the resource at the new location.</p>
+
+ <p>The old <em>URL-path</em> is a case-sensitive (%-decoded) path
+ beginning with a slash. A relative path is not allowed. The new
+ <em>URL</em> should be an absolute URL beginning with a scheme and
+ hostname, but a URL-path beginning with a slash may also be used,
+ in which case the scheme and hostname of the current server will
+ be added.</p>
<example><title>Example:</title>
Redirect /service http://foo2.bar.com/service
behavior as the <directive module="mod_alias">Alias</directive>
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
+ >mod_cgi</module>'s cgi-script handler. URLs with a case-sensitive
(%-decoded) path beginning with <var>URL-path</var> will be mapped
- to scripts beginning with the second argument which is a full
+ to scripts beginning with the second argument, which is a full
pathname in the local filesystem.</p>
<example><title>Example:</title>
</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>
+ server to run the script <code>/web/cgi-bin/foo</code>. This configuration
+ is essentially equivalent to:</p>
+ <example>
+ Alias /cgi-bin/ /web/cgi-bin/<br />
+ <Directory /web/cgi-bin ><br />
+ <indent>
+ SetHandler cgi-script<br />
+ Options +ExecCGI<br />
+ </indent>
+ </Directory>
+ </example>
+
+ <note>It is safer to avoid placing CGI scripts under the
+ <directive module="core">DocumentRoot</directive> in order to
+ avoid accidentally revealing their source code if the
+ configuration is ever changed. The
+ <directive>ScriptAlias</directive> makes this easy by mapping a
+ URL and designating CGI scripts at the same time. If you do
+ choose to place your CGI scripts in a directory already
+ accessible from the web, do not use
+ <directive>ScriptAlias</directive>. Instead, use <directive
+ module="core" type="section">Directory</directive>, <directive
+ module="core">SetHandler</directive>, and <directive
+ module="core">Options</directive> as shown in the second example
+ above.</note>
+
</usage>
+<seealso><a href="../howto/cgi.html">CGI Tutorial</a></seealso>
</directivesynopsis>
<directivesynopsis>