How to make a index.php a default document

I want index.php to replace index.htm as the default document on a directory structure.
Is that posibe? how?


Try it and see if it works first of all (delete your index.htm and upload your index.php). If it doesn’t, then contact the server administrator and ask him to change it (presuming, of course, that you’re allowed to use php with your current account).

Daniel Irvine
f-free - Free Stuff and Freebies!

Do not delete the index.html, just edit it to make it forward to the index.php file using Meta Refresh tags. That is probably the easiest and fastest way that I can think of.
Or I think you could use .htaccess files, though I am not sure about that.

Webmaster’s Network
The Ultimate Webmaster Resource Center

[This message has been edited by Matt Kaufman (edited February 05, 2000).]

couple of ways

  1. edit a .htaccess file in the home directory and put the following :

DirectoryIndex index.php

  1. link the html to the php … you would need to telnet to the server to do this… after deleting the html, telnet in, cd to the directory , and type

ln -s index.html index.php

  1. ask the administrator of the server to add index.php to his apache config file in the “DirectoryIndex” directive

have a nice day

Kryogen Networks - when you want something else

isn’t there a way to change it for onlu some directories?

When I had this problem I just sent an e-mail to the friendly 24/7 technical support department at my web hosting company ( In five minutes they changed it for me.