freki Posted June 19, 2003 Share Posted June 19, 2003 In Apache, if I have an index.php file, it doesn\'t automatically go to that page if I type in just the folder name (for example, the file http://server/test/index.php will not show up if I just type in http://server/test/). Instead, it shows the server directory. I know it automaticaly goes to the page if it\'s index.html, but is there any way to do it for index.php? Sorry if I\'m confusing some of you... Thanks in advance, Andrew EDIT: I\'m using Apache v1.3, not sure if a more recent version has my answer. Quote Link to comment https://forums.phpfreaks.com/topic/615-automatically-go-to-indexphp/ Share on other sites More sharing options...
matd Posted June 19, 2003 Share Posted June 19, 2003 Open up httpd.conf which is under the conf directory of your Apache installation. Look for the following line :- DirectoryIndex index.html index.html.var Simply add your index.php to this line. For example :- DirectoryIndex index.html index.php index.html.var In fact you can add any file here which will make apache use it as an index.page Hope this helps :-) Quote Link to comment https://forums.phpfreaks.com/topic/615-automatically-go-to-indexphp/#findComment-2046 Share on other sites More sharing options...
freki Posted June 20, 2003 Author Share Posted June 20, 2003 That works. Thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/615-automatically-go-to-indexphp/#findComment-2057 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.