Welcome to WebmasterWorld Guest from 54.167.40.25

Forum Moderators: phranque

Message Too Old, No Replies

Index page

     
2:11 am on Sep 21, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:July 29, 2004
posts:95
votes: 0


I am planning to use php to implement a site. I was wondering whether index/default page always has to be *.html/*.htm or can it be *.php also? I hope it can also have php extension but I don't know. Thanks
2:52 am on Sept 21, 2004 (gmt 0)

New User

10+ Year Member

joined:Apr 13, 2004
posts:14
votes: 0


I've encountered similar issues. My hosting company made a few tweaks on the server side and I've been able to set my "default" to .html, .htm and .asp. I imagine something similar could be done for .php.

Hope that helps!

3:26 am on Sept 21, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 19, 2003
posts:1747
votes: 0


I haven't had the problem, because my host has always implemented .php as well as all the rest for index pages. Maybe they're a lot more rara avis than I realized?
3:36 am on Sept 21, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:July 29, 2004
posts:95
votes: 0


So I should just try naming the page default.php and see whether it works or not. Hopefully it will. If not I'll be back to post another message. Thanks guys....
3:51 am on Sept 21, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Feb 13, 2003
posts:590
votes: 0


The index/default page can be set on the server to be anything you want -- including monkey.butt.

It's generally set server-wide to include a list of filenames in a particular order: index.htm, index.html, index.php, index.shtml, default.htm, etc. The server will look for the pages in the order listed. If it finds the first one, it serves it up. If it doesn't, it looks for the second, and so on. So generally, if you use index.php, just make sure there's no index.htm or index.html, and it'll probably use index.php.

If your site is on a *nix box, you can also set the default page for your site in your .htaccess file, if your host allows it, or for a specific directory of your site.

You'd have to find out from your host what their server-side settings are, and if they allow you to use .htaccess.