Forum Moderators: phranque

Message Too Old, No Replies

Not Forwarding to index file

         

almo136

3:10 pm on Feb 3, 2009 (gmt 0)

10+ Year Member



Hi,

When I type in the url for my site eg.

www.mysite.com

I get taken to an apache index page with a list of the sites folder directory. Why does it not automatically forward me to www.mysite.com/index.php?

This was working before so i don't know what has went wrong.

I tried changing the index page from index.php to index.html but this didn't help. The only way I can get to the page is by manually typing www.mysite.com/index.php

i even tried setting up a redirection but that didn't work either.

Does anyone know how to resolve this?

Thanks!

eelixduppy

3:20 pm on Feb 3, 2009 (gmt 0)



In your apache configuration file httpd.conf you should be able to set the DirectoryIndex directive which will allow you to specify which files you want.

[httpd.apache.org...]

g1smd

3:43 pm on Feb 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



DirectoryIndex should fix it, but then you would be well advised to also add a redirect such that if the requested URL contains an index filename that you redirect to strip off that filename in the URL that the user sees.

almo136

5:01 pm on Feb 3, 2009 (gmt 0)

10+ Year Member



perfect, thanks1