Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/615-automatically-go-to-indexphp/
Share on other sites

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 :-)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.