apache redirects to

May 4, 2007
Reaction score
Hi all,

i'm having a problem with my web server, perhaps someone can help. i can remember having the same problem on an OS X 10.2, and somehow solving it, but i have no clue how i did that (it was more than 1 year ago...)

so basically here's the problem: i have my apache running on my mac at home. i use my DSL router to update my DNS entry, and that works fine. i can access pages, or ssh to my server, that's ok.
the problem arises when i try to access *directories* on the mac. in such cases, where apache would either try to display a dir index or search for index.html, it simply redirects the call to, and of course it doesn't work...

here are a few examples:
http://pagod.dyndns.org/ -> redirect to http://pagod.dyndns.org/index.html (fine)
http://pagod.dyndns.org/~pagod/ -> redirect to http://pagod.dyndns.org/~pagod/index.html (fine)
http://pagod.dyndns.org/~pagod (no slash at the end) -> redirect to NOT FINE!!!
http://pagod.dyndns.org/~pagod/test/ -> redirect to http://pagod.dyndns.org/test/index.html (seems to be fine)
http://pagod.dyndns.org/~pagod/test (no slash at the end!) -> redirect to NOT FINE!!!
http://pagod.dyndns.org/~pagod/test/index.html -> displays index.html (fine)

when i try to get the last-but-one with wget, i get the following message:
pingoo temp/test> wget "http://pagod.dyndns.org/~pagod/test"
=> `test'
Connecting to connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: [following]
=> `index.html'
Connecting to failed: Connection refused.
pingo temp/test>

using the IP instead of the server name doesn't make things better, i.e. accessing (my current IP) doesn't work, but accessing (with slash at the end) does work.

finally, once an index has been successfully loaded (e.g. by adding the slash at the end of the address), further attempts to load it (without slash) will work as well in the same session (e.g. browser window). might have been cached on the server side?..

anyone already experienced this problem, and/or knows how to solve it? i guess it's a config problem, but i'm rather new to apache and i don't feel too comfortable playing around with httpd.conf yet...

thx a lot in advance!!


Shop Amazon

Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.