Index page after loading domain name

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
fevenbly
Forum Newbie
Posts: 2
Joined: Thu Aug 27, 2009 4:28 pm

Index page after loading domain name

Post by fevenbly »

Good afternoon/evening everyone! I am new at this and would like some help.

I have a domain xxxxx.com which when users link to it loads webpage index.html.

However, this hi page needs to execute some php and I know in order to do that the file extension must be .php.

Is there a simple way for my users to continue typing my domain name and then go to e.g. index.php?

Your help will be greatly appreciated.
Regards
Frits Evenbly
Southlake, TX
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Index page after loading domain name

Post by Darhazer »

Type the following in your .htaccess file:

Code: Select all

DirectoryIndex index.php index.html
By the ways, servers are usually configured to load index.php if there is no index.html
fevenbly
Forum Newbie
Posts: 2
Joined: Thu Aug 27, 2009 4:28 pm

Re: Index page after loading domain name

Post by fevenbly »

Thank you very much, that is a lot simpler than I realized! I was going to write some fancy way via javascript and using include in php etc.

Now I just renamed my index file and it still loads.

Thanks again
Frits
Post Reply