[SOLVED] index.php default

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
marinajc
Forum Newbie
Posts: 13
Joined: Tue Aug 24, 2004 11:51 am

[SOLVED] index.php default

Post 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. :?:
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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....
marinajc
Forum Newbie
Posts: 13
Joined: Tue Aug 24, 2004 11:51 am

Thanks

Post by marinajc »

Thanks, but I am a newbie. Where do I find httpd.conf file?

thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
marinajc
Forum Newbie
Posts: 13
Joined: Tue Aug 24, 2004 11:51 am

.htaccess.txt

Post 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
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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
marinajc
Forum Newbie
Posts: 13
Joined: Tue Aug 24, 2004 11:51 am

THANKS!!!!!!!

Post by marinajc »

It worked :D
Post Reply