Index.html as opposed to Index.php ?

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
User avatar
GeorgeF
Forum Newbie
Posts: 10
Joined: Tue May 27, 2003 4:57 am
Location: Ash Hampshire

Index.html as opposed to Index.php ?

Post by GeorgeF »

Hi this may seam like a lame question but my ISP insist that the first page to launch my site is named either Index.htm or Index.html.

I have also dicovered that to run any code within htm(l) documents I have to rename my .htm(l) files with the .php extension. However, my index page has some 'includes' for the header and footer within the page that refuse to parse because the extension is .html.

I have thought of a fudge by creating a two frames Index.html with the top frame compleately set to 0 and the bottom frame filling the whole screen I then tell it to load my 'welcome'.php file into this frame.

My question is, how can I get around this without using the fudge described above? I.e. not to use any frames

Any help would be appreciated
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Which webserver is your site running on?

Mac
User avatar
GeorgeF
Forum Newbie
Posts: 10
Joined: Tue May 27, 2003 4:57 am
Location: Ash Hampshire

Post by GeorgeF »

Here's a link to there PHPINFO. I am not too sure how to read it all yet . I'm just starting out. But I think it will give you the information you need and will answer your question.

http://bargainhost.co.uk/phpinfo.php
User avatar
Wayne
Forum Contributor
Posts: 339
Joined: Wed Jun 05, 2002 10:59 am

Post by Wayne »

you could always set up a index.htm(l) page that has no content and just does a redirect to whatever page you want.

Code: Select all

<meta http-equiv="refresh" content="0;url=index.php">
User avatar
GeorgeF
Forum Newbie
Posts: 10
Joined: Tue May 27, 2003 4:57 am
Location: Ash Hampshire

I have just found the solution

Post by GeorgeF »

I have just found the solution buried in my hosts documentation:

I quote:-

'1. You don't have a properly named default page in your main WWW directory. Acceptable file names are listed below: index.htm index.html default.html index.sht index.shtml index.cgi index.php3 '

Sorry for the fuss but thanks anyway. I'll rename my Index file with .php3 less the frames and check it out.
Post Reply