Change index.htm to index.php

Discussion in 'HTML & Website Design' started by nadlay, Aug 16, 2004.

  1. #1
    I want to add some PHP code to one of my sites in the home page.

    What will be the impact if I just rename the index.htm to index.php?

    Most of my links are just direct to the site, not to a particular page, but obviously Google has www.mydomain.com/index.htm already indexed.

    Does Google automatically look for index.php if the index.htm is no longer available?
     
    nadlay, Aug 16, 2004 IP
  2. xml

    xml Peon

    Messages:
    254
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Why not just push *.htm through the PHP interpreter?

    In .htaccess:

    AddHandler application/x-httpd-php .htm
     
    xml, Aug 16, 2004 IP
  3. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #3
    if you do want to rename your index, though, you can make index.html 301 to index.php

    but just for the record, you should probably ask people to link to your root directory (www.domain.com) instead of www.domain.com/index.html :)
     
    disgust, Aug 16, 2004 IP
  4. nadlay

    nadlay Guest

    Messages:
    306
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That's what I do.

    I always just get links to the root directory - that is why I wondered if I even needed to do anything.

    However, XML's suggetsion seems like an easy option, because I then don't have to rename anything.
     
    nadlay, Aug 16, 2004 IP
  5. Trance-formation

    Trance-formation Peon

    Messages:
    598
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I renamed all my sites from htm to php (didn't know about the other options)...

    The PR on my root directory remained unchanged, but my internal links to index.php showed up PR 0 for months, and it has taken months for my other pages to recover :)
     
    Trance-formation, Aug 16, 2004 IP
  6. Owlcroft

    Owlcroft Peon

    Messages:
    645
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can, but, unless all (or nearly all) the site pages formerly .htm are now .php, there's a fair-sized performance hit.


    As I was just remarking on another forum, of many terrible and unfair things that Google does that is very possibly the most terrible and unfair. You can have been doing business for ten straight years with a whole site located at www.mywonderfulsite.com/myspecialstuff/, and have PR 6 and PR 5 pages all over--but move that lot ensemble to www.myspecialstuff.com, with a perfectly regular (and Google-recommended) 301 Redirect, and you're dead meat--for both old and new names--for months.

    Very nice, good mastersss, yesss, sso very fair, good mastersss.
     
    Owlcroft, Aug 17, 2004 IP
  7. kooldesigning

    kooldesigning Greenhorn

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #7
    I changed my page name from index.html to index.php and my ranking were not heart at all. But to be on safe side you use 301 redirct
     
    kooldesigning, Dec 13, 2012 IP
  8. ElectCon

    ElectCon Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I would like to rename my pages from .htm to .php. I only have 5 pages right now, the website has only been up for a little over a month. Google and other search engines have indexed it, but by what you ladies and gentlemen have said it shouldn't hurt for me to change the extension, correct?

    Quick question, what should I do as far as this "301 redirect" that some have mentioned?

    For example, I would like to change the existing pages index.htm and contact.htm to index.php and contact.php.
     
    Last edited: Jan 19, 2013
    ElectCon, Jan 19, 2013 IP