Page 1 of 1

DirectoryIndex

PostPosted: 06. September 2011 16:53
by ggalan
inside my http.conf i have the following
Code: Select all
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm index.py
</IfModule>


but when i go to http://localhost/myDirectory
the default index.php does not activate, rather i get a file list of what is inside the directory and have to click the index.php file

how can i set it so that it defaults to the index file?

Re: DirectoryIndex

PostPosted: 07. September 2011 03:01
by JonB
based on that code - it "SHOULD" display the index.php file automatically.

That probably means SOMETHING ELSE happened. my personal bet in on an errant .htaccess file running about.

where did the 'myDirectory' folder come from??

is there by any chance a .htaccess file in it???

:?:

Re: DirectoryIndex

PostPosted: 07. September 2011 04:05
by ggalan
thanks! i had a .htaccess file in the root directory, but why would that affect every folder?

Re: DirectoryIndex

PostPosted: 07. September 2011 04:30
by JonB
LOL - because its in the root... .htaccess is a recursive directive. :mrgreen:

Here's a good explanation:
http://www.besthostratings.com/articles/htaccess.html

Good Luck
8)

Re: DirectoryIndex

PostPosted: 07. September 2011 04:41
by ggalan
will look, thanks again : )

but if you have a htaccess password on a folder its not recursive.