Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Can't get "trailing slash" redirection in mod_dir to work

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
trailing slash error - I have recently seen trailing slash errors in my error logs...I am not the admin of the site but am wondering if there is a there is some sort of Apache bug that is causing this or is it a simple error? Thanks Cheers, -sd..

trailing / and NAT - I'm new to apache. I'm not sure if this is part of the problem but here's the setup... I have a web server behind NAT. This server therefore has an IP address and DNS zone on each network. However, the server has the same DNS hostname on each zone. I.

add slash to virtual dir - how can i add slash to virtual i put this rule in htaccess ([^/]+)/$ and redirect to but return a 404 -- ..

Ending slash in url - Rather common problem with ending slash at end of URL. I can't manage problems, that every time I go to I get error message - Can not display page (in IE), but when I add the / at end of url, is ok. Only way to get some..

trailing / is ther a way to do away with it - ya this may be a lame question but i have just setup apache 2.0.46 and when i connect to it gets the index just fine but lets say i go and try to get it will not look in the directory to find the index files but if i..
Author Message
4thchildren

External


Since: Aug 15, 2004
Posts: 4



(Msg. 1) Posted: Sun Aug 15, 2004 6:44 am
Post subject: Can't get "trailing slash" redirection in mod_dir to work
Archived from groups: alt>apache>configuration (more info?)

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

 >> Stay informed about: Can't get "trailing slash" redirection in mod_dir to work 
Back to top
Login to vote
4thchildren

External


Since: Aug 15, 2004
Posts: 4



(Msg. 2) Posted: Mon Aug 16, 2004 10:15 pm
Post subject: Re: Can't get "trailing slash" redirection in mod_dir to work [SOLVED] [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

....
Forget it, everyone: It's a false alert ... Razz

Sorry

MfG
Marc Richter

 >> Stay informed about: Can't get "trailing slash" redirection in mod_dir to work 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]