Renamed index.html to index.php - Is it Okay?

Discussion in 'HTML & Website Design' started by Daemon23, Apr 6, 2008.

  1. #1
    I wanted to use some php code on my home page but I don't know php. So I added the code and just renamed the index.html file to index.php. It seems to work fine. Is it okay to do this or will it create problems?

    Thanks
     
    Daemon23, Apr 6, 2008 IP
  2. TechnoGeek

    TechnoGeek Peon

    Messages:
    258
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Renaming a page will make that all links to that page don't work any more. You must change all links to the old name to using the new name. This also affects external links, that is, links outside your site, and most principally, the links to your home page in search engine results. What you must do depends, of course, on what is your main source of visitors. At least, you should include a redirection line in the htaccess file.
     
    TechnoGeek, Apr 6, 2008 IP
  3. Star_

    Star_ Banned

    Messages:
    94
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no it wont, html comes first then php

    so aslong as there inst a file called index.html along with it it will be fine
     
    Star_, Apr 6, 2008 IP
  4. pcknowhow.com

    pcknowhow.com Peon

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    pcknowhow.com, Apr 6, 2008 IP
  5. beagrie

    beagrie Peon

    Messages:
    32
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The 301 redirect worked fine for me on a site I re-did recently, changing it from a framed design to a php header and footer affair. However, I should point out that if your site has been around a while (like this one had) and google(or the search engine of your choice) has it etched permanently in it's memory banks, it will effect your search rankings.

    I'm no expert on search bots but I think it's because, while the spider still gets redirected to new .php page, it registers the 301 as an empty page and thus it's ranking drops.

    Of course if your not bothered about search rankings or you can wait the four months it'll take for google to spider your site again and register the new .php file then you have nothing to worry about.
     
    beagrie, Apr 6, 2008 IP