Jump to content
  • Advertisement

Archived

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

Mulligan

How to make a .php page the default

This topic is 5493 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I had a .html page called index.html on my site, but now Ive changed it to index.php file and it no longer displays automatically. How do I get it to display automatically like index page?

Share this post


Link to post
Share on other sites
Advertisement
I just scanned all the files for the server and none of them contain a line with 'DirectoryIndex' in it, is it somewhere special?

[EDIT]

oh wait, i got something here, 1 sec


[EDIT AGAIN]

Ok i found this line

DirectoryIndex index.html index.html.var

now should I comment it out and make it

DirectoryIndex index.php index.php.var ?

I just tried adding the line (above) and saving it, it didnt work. Then I commented out the origional line and put the php line, but it still didnt work. Hmm.

Thanks for the quicke reponses, you got me on the right track, thanks.

[edited by - Mulligan on October 6, 2003 10:16:58 PM]

Share this post


Link to post
Share on other sites
If you are using Apache 1 or 2:
go the root dir where you installed it
go to the conf/ dir
open httpd.conf
on about line 326, you will have somthing like this:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var

add index.php to the end of that string:
#
DirectoryIndex index.html index.html.var index.php

restart Apache



edit: yours might look a litle diferent, but the directive (DirectoryIndex) is the same.

[edited by - aftermath on October 6, 2003 10:17:35 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!