Hi there!
I need some help with the "trailing slash redirect" funktion in
mod_dir.
I'm using Apache v2.0.50 with Linux.
mod_dir.c is statically compiled. For proof:
# httpd -l
Compiled in modules:
[...]
mod_cgi.c
mod_vhost_alias.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
[...]
#
The following is quoted from the "Apache Module mod_dir"
documentation (http://httpd.apache.org/docs-2.0/mod/mod_dir.html):
##### Quotation start
"A "trailing slash" redirect is issued when the server receives a
request for a URL
http://servername/foo/dirname where dirname is a
directory. Directories require a trailing slash, so mod_dir issues a
redirect to
http://servername/foo/dirname/"
##### Quotation stop
When I specify some aliases using:
Alias /test "/var/www/htdocs/" for example, I get a 404 when entering
"http://www.server.com/test/" (mind that last "/"). Or vice versa:
When specifying with:
Alias /test/ "/var/www/htdocs/", I get a 404 when opening the URL as
"http://www.server.com/test" (mind the missing "/" at the end).
My current workaround for this is specifying "/test" AND "/test/".
When I do so, I get the following error when starting/stoping the
server, but "http://www.server.com/test" and
"http://www.server.com/test/" are working both, then:
##### Error Quotation start
"[Sun Aug 15 03:41:43 2004] [warn] The Alias directive in
/etc/httpd/httpd.conf at line 38 will probably never match because it
overlaps an earlier Alias."
##### Error Quotation stop
But that's very ugly in my opinion, and mod_dir should EXACTLY avoid
this - so: What am I missing?
Thanks for your interest!
MfG
Marc Richter