Jump to content


Automatically go to index.php?

  • Please log in to reply
2 replies to this topic

#1 freki

  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 19 June 2003 - 05:45 PM

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.
The PHP Newbie Extraordinaire!

#2 matd

  • Members
  • PipPip
  • Member
  • 12 posts
  • LocationUK

Posted 19 June 2003 - 09:28 PM

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

#3 freki

  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 20 June 2003 - 01:17 PM

That works. Thanks a lot :D
The PHP Newbie Extraordinaire!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users