You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2003/01/08 23:07:10 UTC
cvs commit: httpd-docs-1.3/htdocs/manual/misc FAQ-E.html
rbowen 2003/01/08 14:07:10
Modified: htdocs/manual/misc FAQ-E.html
Log:
This is another rather common cause of the "trailing slash" problem.
Revision Changes Path
1.24 +29 -1 httpd-docs-1.3/htdocs/manual/misc/FAQ-E.html
Index: FAQ-E.html
===================================================================
RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/misc/FAQ-E.html,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- FAQ-E.html 25 Jul 2002 20:38:26 -0000 1.23
+++ FAQ-E.html 8 Jan 2003 22:07:09 -0000 1.24
@@ -485,6 +485,34 @@
href="../mod/core.html#servername">ServerName</a> directive
to the config file to tell it what the domain name of the
server is.</p>
+
+ <p>The other thing that can occasionally cause this symptom is a
+ misunderstanding of the <a
+ href="../mod/mod_alias.html#alias">Alias</a> directive,
+ resulting in an alias working with a trailing slash, and not
+ without one. The <code>Alias</code> directive is very literal,
+ and aliases what you tell it to. Consider the following
+ example:</p>
+
+ <pre>
+ Alias /example/ /home/www/example/
+ </pre>
+
+ <p>The above directive creates an alias for URLs starting with
+ <code>/example/</code>, but does <em>not</em> alias URLs
+ starting with <code>/example</code>. That is to say, a URL such
+ as <code>http://servername.com/example/</code> will get the
+ desired content, but a URL such as
+ <code>http://servername.com/example</code> will result in a
+ "file not found" error.</p>
+
+ <p>The following <code>Alias</code>, on the other hand, will
+ work for both cases:</p>
+
+ <pre>
+ Alias /example /home/www/example
+ </pre>
+
<hr />
</li>