Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to get apache to add trailing slash to a typed address..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Advocate
n00b
n00b


Joined: 01 Aug 2002
Posts: 42

PostPosted: Fri Aug 09, 2002 9:14 am    Post subject: How to get apache to add trailing slash to a typed address.. Reply with quote

Let's say I have a site called http://www.deviantpc.com (I do actually ;) )
and I have forums located at http://www.deviantpc.com/forums/

If someone types http://www.deviantpc.com/forums and misses off the trailing slash how do I get apache to add it back in?
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Fri Aug 09, 2002 9:19 am    Post subject: Reply with quote

Have you enabled the mod_dir module?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Advocate
n00b
n00b


Joined: 01 Aug 2002
Posts: 42

PostPosted: Fri Aug 09, 2002 9:48 am    Post subject: Reply with quote

The line

LoadModule dir_module libexec/apache/mod_dir.so

is present in my httpd.conf file, is that the one?

Actually if you try entering http://www.deviantpc.com/forums into IE then you get the msn search page coming up....very strange
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Fri Aug 09, 2002 9:58 am    Post subject: Reply with quote

I think you've got a strange ServerName or something, because I get a 301 to http://1aa.34sp.com/forums/ when I request http://www.deviantpc.com/forums, and that hostname doesn't resolve for me:
Code:
$ telnet www.deviantpc.com 80
Trying 212.187.158.84...
Connected to deviantpc.com.
Escape character is '^]'.
GET /forums HTTP/1.0

HTTP/1.1 301 Moved Permanently
Date: Fri, 09 Aug 2002 09:56:27 GMT
Server: Apache/1.3.26 (Unix) PHP/4.2.2
Location: http://1aa.34sp.com/forums/

_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
Advocate
n00b
n00b


Joined: 01 Aug 2002
Posts: 42

PostPosted: Fri Aug 09, 2002 11:12 am    Post subject: Reply with quote

Thanks for you help mate...turned out ServerName wasn't even set!! DOH!
Back to top
View user's profile Send private message
delta407
Bodhisattva
Bodhisattva


Joined: 23 Apr 2002
Posts: 2876
Location: Chicago, IL

PostPosted: Fri Aug 09, 2002 1:04 pm    Post subject: Reply with quote

My personal favorite solution: mod_rewrite. There's even a section about this in the docs.
_________________
I don't believe in witty sigs.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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