Portal Home > Knowledgebase > Articles Database > DirectoryIndex not working on httpd.conf


DirectoryIndex not working on httpd.conf




Posted by nee4, 11-29-2009, 03:55 AM
I change my DirectoryIndex in httpd.conf to but it still can't redirect automatically to index.php even tough i add index.php How to fix this?

Posted by madaboutlinux, 11-29-2009, 04:02 AM
Make sure you don't have a .htaccess in the account and having a DirectoryIndex set to index.html as .htaccess overrides the server side settings. If there isn't a .htaccess file, it should pick up the index.php first in that case but if it isn't, create a .htaccess file under the account and specify the DirectoryIndex there.

Posted by fabin, 11-29-2009, 04:23 AM
you need to restart httpd after changing httpd.conf

Posted by david510, 11-29-2009, 04:37 AM
If apache has been restarted, check if the documentroot set correct. Take a non-existent page and tail the apache error_log file.

Posted by nee4, 11-29-2009, 06:40 AM
Thanks for the replies all, the setting DirectoryIndex in httpd.conf is overriden by virtual host DirectoryIndex. So, i remove DirectoryIndex line in my virtualhost.

Posted by david510, 11-29-2009, 07:08 AM
Oh well, Good catch



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
phpBB vs Vbulletin (Views: 756)
slhost.com down? (Views: 836)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.