Changing File Extension From .html to .php

Discussion in 'Search Engine Optimization' started by Forcefield, Nov 21, 2006.

  1. #1
    I need to change a few of my pages from index.html to index.php.

    Are there any consequences when changing file extensions?

    Will this affect my PR or backlink count? Does anyone have any experience with this?

    Thanks!
     
    Forcefield, Nov 21, 2006 IP
  2. SEOBangkok-Puripong2

    SEOBangkok-Puripong2 Guest

    Messages:
    59
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    These changes will effect your PR for sure, you should use 301 redirect to redirect from you old pages to the new one to prevent you lose your page PR and to maintain your cached pages in Google. If you don't do redirect then bot will crawl your old pages, when not found, they'll mark this page as 404 error and that's not good for your site overall.
     
    SEOBangkok-Puripong2, Nov 22, 2006 IP
  3. mani

    mani Peon

    Messages:
    679
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes these will effect your PR, because .html pages are indexed and .php will be new for google,

    You can try a mod rewrite to redirect or rewrite php urls to .html urls
     
    mani, Nov 22, 2006 IP
  4. tofumonkey

    tofumonkey Peon

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    if google had alreadyy indexed that pages, then it'll be considered a missing link.

    index.htm and index.php are essentially 2 different files...
     
    tofumonkey, Nov 22, 2006 IP
  5. Mong

    Mong ↓↘→ horsePower

    Messages:
    4,789
    Likes Received:
    734
    Best Answers:
    0
    Trophy Points:
    235
    #5
    If you will change extensions manually then it will effect a lot based on how good they are already performing.
     
    Mong, Nov 22, 2006 IP
  6. Forcefield

    Forcefield Peon

    Messages:
    314
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #6
    So I'm assuming that the number of backlinks would remain the same since I'm only changing my index files, and these backlinks point to mydomain.com and NOT mydomain.com/index.html, am I right?

    The only thing that would be affected is my PR, which would only be temporary until the new PR is calculated, right?
     
    Forcefield, Nov 22, 2006 IP
  7. Amsterdam

    Amsterdam Well-Known Member

    Messages:
    361
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #7
    If you want to use PHP on your pages without losing backlinks and PR wouldn't it be a simpler idea to get your server's PHP engine to parse htm and html files and avoid renaming them? As I understand it, this can be achieved by uploading an .htaccess file with the following content:-

    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .htm .html
     
    Amsterdam, Nov 22, 2006 IP
  8. Forcefield

    Forcefield Peon

    Messages:
    314
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yes, I've considered using this method for just the index files and then have Apache parse the other files as plain html. I think this would be the easiest, not to mention less stressful approach.

    The only thing I'm concerned about, is that some people have told me that this causes a download prompt in some browsers? However, I don't really understand this.

    Can someone shed some more light on this topic?
     
    Forcefield, Nov 22, 2006 IP
  9. Amsterdam

    Amsterdam Well-Known Member

    Messages:
    361
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #9
    I've never heard of that and I am inclined to believe that it is untrue. However, I am by no means an expert.

    The way it works in my understanding is this...

    When a PHP file is parsed by the server's PHP engine it is then passed to the client's browser as good old HTML - therefore there will be no download prompt unless the HTML page contains a link to some other file format.

    T
     
    Amsterdam, Nov 22, 2006 IP
  10. Forcefield

    Forcefield Peon

    Messages:
    314
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I had never heard of it either, until I recently read a thread here: http://www.php-editors.com/forums/showthread.php?p=7761

    I also read some threads about this on Webmaster World as well.

    It's hard to understand the logic behind this, because the .htaccess file controls everything on the server side, therefore it can't be a client side browser issue, right? Weird stuff.
     
    Forcefield, Nov 22, 2006 IP
  11. Forcefield

    Forcefield Peon

    Messages:
    314
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Ok, I "think" I understand how it works now.

    According to DrBacchus’ Journal at: http://wooga.drbacchus.com/?p=843

    So in other words, with some browsers, the AddType directive somehow invokes a file download prompt because it associates a Content-Type with a file extension, in turn confusing the browser as to how the file should be treated?
     
    Forcefield, Nov 22, 2006 IP
  12. Amsterdam

    Amsterdam Well-Known Member

    Messages:
    361
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #12
    Great link - that seems to clear it up (although I haven't tested it yet).

    So now it seems you can avoid renaming your files and your problem is solved!

    T
     
    Amsterdam, Nov 23, 2006 IP
  13. Forcefield

    Forcefield Peon

    Messages:
    314
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Yes, problem solved! Thank you all for your help. :)

    Although I'd still like to learn more about 301 redirects.

    This thread is already starting to go off topic, so I'll start another thread in the future.
     
    Forcefield, Nov 23, 2006 IP
  14. netvisao

    netvisao Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    When a PHP file is parsed by the server's PHP engine it is then passed to the client's browser as good old HTML - therefore there will be no download prompt unless the HTML page contains a link to some other file format.
     
    netvisao, Sep 30, 2009 IP