Jump to content

Archived

This topic is now archived and is closed to further replies.

freki

Automatically go to index.php?

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.

Share this post


Link to post
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 :-)

Share this post


Link to post
Share on other sites

×

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.