Do I need an index.html file?

Discussion in 'HTML & Website Design' started by NigelWest, May 16, 2007.

  1. #1
    I just added Co-op to my website.

    My site is all in PHP appart from the main (front) page which was in plain html.

    Originally I wasnt going to put ads onthe front page, but in order for co-op to see all of the adds I have on my site I had to configure the co-op control panel to say www.mydomain.com rather than www.mydomain.com/page1.php

    Now to do this I had to change the main (front) page to php. Not a big deal, but now it is called index.php not index.html.

    Is it bad practice to call the file index.php and not have an index.html file, or should I create a file called index.html and point it to index.php
     
    NigelWest, May 16, 2007 IP
  2. cornchild

    cornchild Well-Known Member

    Messages:
    184
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    128
    #2
    The index.php file is ok, the server recognizes it as you default homepage to show. In fact both are ok the server identifies both of them as your default home page so you should use what suits you.
     
    cornchild, May 16, 2007 IP
  3. 8everything

    8everything Peon

    Messages:
    16,350
    Likes Received:
    903
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Don't forward your index.html to index.php.... just name your file index.php like cornchild said. Redirecting/reloading pages may confuse visitors.
     
    8everything, May 16, 2007 IP
  4. zk0

    zk0 Peon

    Messages:
    299
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Dont forget that Google doesnt like it when pages are re-directed to some other place...
     
    zk0, May 16, 2007 IP
  5. rlineker

    rlineker Well-Known Member

    Messages:
    1,534
    Likes Received:
    172
    Best Answers:
    0
    Trophy Points:
    160
    #5
    Set up .htaccess to send it to any page you want ;-)

    Ryan
     
    rlineker, May 16, 2007 IP
  6. NigelWest

    NigelWest Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for the info.

    Nigel
     
    NigelWest, May 16, 2007 IP