Page 1 of 1

[SOLVED] index.php default

Posted: Mon Mar 07, 2005 10:53 am
by marinajc
Hello:

I need to make an entrance page in html, i.e., index.html and not have have my index.php be the default. Other than installing the index.php in a separate directory, is there anyway around this? I've already installed the program.

Thanks. :?:

Posted: Mon Mar 07, 2005 10:58 am
by Chris Corbyn
I always have Apache httpd.conf set up so that index.html comes before index.php.

Edit your httpd.conf file and make sure that index.html comes before index.php in the indexes part :wink:

EDIT: I believe CPanel also gives access to chaging the default files....

Thanks

Posted: Mon Mar 07, 2005 11:10 am
by marinajc
Thanks, but I am a newbie. Where do I find httpd.conf file?

thanks

Posted: Mon Mar 07, 2005 11:14 am
by feyd
you may not have access to editing the httpd.conf file, as that's the server's configuration information file.. .htaccess can change around the indexing as well:

Code: Select all

DirectoryIndex index.html index.htm index.php
is an example of a .htaccess file. This of course, requires an .htaccess compliant server, such as Apache.

.htaccess.txt

Posted: Mon Mar 07, 2005 11:25 am
by marinajc
Hi:

I made a file called .htaccess.txt (I have apache) and typed your code in it:

DirectoryIndex index.html index.htm index.php

and it still goes to the index.php.

Any ideas?

Thanks

Posted: Mon Mar 07, 2005 11:29 am
by Chris Corbyn
He never said .htaccess.txt :roll:


Just .htaccess

Put it in the directory you need it to apply and it should work

THANKS!!!!!!!

Posted: Mon Mar 07, 2005 11:46 am
by marinajc
It worked :D