#1
  1. No Profile Picture
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Aug 2004
    Location
    UK
    Posts
    222
    Rep Power
    15

    Question Shifting from .htm to .php


    Hi Guys,

    I have a question. I have a client who has a site in plain html. Front page is index.htm and PR 4. Now he wants to change the site to .php

    I am aware that once this is done, the SE's will figure its a new site and any indexing will be lost. PR will go back to 0, and there is a serious possibility of the site getting Sandboxed. Is there any way around it?

    The only solution I came up with was having 2 index pages. A .htm and a .php with the domain defaulting to the .htm, and the .htm linking to the .php at least untill the .php gets indexed by G and others.

    Once it is indexed, we deactivate the index.htm and use the .php as the domain default.

    What do you think.
  2. #2
  3. No Profile Picture
    mick.sawyer
    Guest
    SEO Chat Mastermind (5000+ posts)
    You will still have the same pr on your index page but you will lose it on all your other pages.

    I am changing all my sites to php and its a hard journey because as i lose my pr and my established /mypage.htm i lose the traffic that comes with it.
    I would not reccomend having the two index pages as you wont need them.
  4. #3
  5. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2005
    Location
    London - UK
    Posts
    16
    Rep Power
    0
    Originally Posted by mick.sawyer
    You will still have the same pr on your index page but you will lose it on all your other pages.

    I am changing all my sites to php and its a hard journey because as i lose my pr and my established /mypage.htm i lose the traffic that comes with it.
    I would not reccomend having the two index pages as you wont need them.
    Hi Guys, first post here but have been lurking for ages. Instead of renaming all of your pages .php all you need to do is tell the server to parse .htm files as if they were php. That way you'll get all the bells and whistles of php and you get to keep all your filenames.

    Cheers

    Pinky
  6. #4
  7. No Profile Picture
    mick.sawyer
    Guest
    SEO Chat Mastermind (5000+ posts)
    Welcome to the forums pinky.

    What if you want to make them php to do includes.
    Tell us more about how you do this and what its features and benefits are please.
  8. #5
  9. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2005
    Location
    London - UK
    Posts
    16
    Rep Power
    0
    Hi Mick

    The site in my profile is set to parse .htm files as php. Every page on the site has at least 3 includes on it (each of the nav bars) and as you can see everything works properly.

    If you're running php I presume you're on a unix/linux box, in which case you can use the .htaccess field to do this. I actually asked my host to do this for me because I'm not massively techy, but as far as I'm aware you just need to add this line to your .htaccess file.

    AddHandler application/x-httpd-php .htm

    This should let your box know to treat .htm files as if they were .php.

    Let me know how you get on or if I need to clarify further.

    Cheers

    Pinky The Pig
  10. #6
  11. No Profile Picture
    mick.sawyer
    Guest
    SEO Chat Mastermind (5000+ posts)
    I am not techy as well but i will give that a go now and get straight back with the results.

    If i had known this it could have saved me hours and hours of work.
    WOW, i still have a lot to learn.
  12. #7
  13. No Profile Picture
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    May 2003
    Location
    New Zealand
    Posts
    139
    Rep Power
    16
    Either that, or put a redirect in .htaccess like this:

    Code:
    RewriteEngine On
    
    RewriteRule ^index.htm /index.php [R=301,L]
    Which means when a spider/user goes to index.htm it will redirect to the new .php page, and thus the PR should be transferred to the new page.
  14. #8
  15. Extremely Googled
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    Dec 2004
    Posts
    1,035
    Rep Power
    501
    An easier solution, beyond a mod rewrite (which is what Pinky is advocating) is to 301 your htm pages to your PHP pages. I did this and lost no PR whatsoever.

    You will need to have .htaccess regardless to do this since there's no other way to 301 htm pages.
  16. #9
  17. Contributing
    SEO Chat Hero (2000 - 2499 posts)

    Join Date
    Sep 2003
    Location
    Montreal / Canada
    Posts
    2,185
    Rep Power
    707
    I read a while ago about a guy that wanted to do php on his site and was recommanded to just use Cpanel to make the server parse the html pages just like php. Never heard if it worked but it should. I did that for my htm and html pages to be treated as shtml to be able to use includes... no 301 to do since the pages don't get renamed.

    It would be in the apache handlers that you do that.
    Disclaimer : My posts on SEO are just from my observations and I do not say it is a true fact... A real fact of life is that, I'm often wrong...
  18. #10
  19. No Profile Picture
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Aug 2004
    Location
    UK
    Posts
    222
    Rep Power
    15
    Originally Posted by Highland
    An easier solution, beyond a mod rewrite (which is what Pinky is advocating) is to 301 your htm pages to your PHP pages. I did this and lost no PR whatsoever.

    You will need to have .htaccess regardless to do this since there's no other way to 301 htm pages.
    I am not really worried about all the other pages as the site is Framed. Therefore I only want to keep the main page PR as all the other are not even indexed. I am removing all frames and other Search Engine Buggers. I am assuming from this discussion that both the 301 redirect and the htm parse would work with a framed site?
  20. #11
  21. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2005
    Location
    London - UK
    Posts
    16
    Rep Power
    0
    Originally Posted by Highland
    An easier solution, beyond a mod rewrite (which is what Pinky is advocating) is to 301 your htm pages to your PHP pages. I did this and lost no PR whatsoever.

    You will need to have .htaccess regardless to do this since there's no other way to 301 htm pages.
    Hi HighLand

    My solution isn't to use Mod ReWrite, that is what Noodles has suggested. Any of the posted solutions, including your 301 redirect will work. Mick - have you had any luck with any of the suggested solutions.

    Cheers

    P
    Last edited by Pinky; Mar 15th, 2005 at 07:20 AM.

Similar Threads

  1. .html/ .htm
    By semarketing in forum Search Engine Optimization
    Replies: 3
    Last Post: Nov 9th, 2004, 09:56 AM
  2. .php problem in google?
    By jnarowski in forum Google Optimization
    Replies: 1
    Last Post: Oct 25th, 2004, 04:30 PM
  3. .htm vs .php
    By primelibra in forum Google Optimization
    Replies: 4
    Last Post: Jun 5th, 2004, 07:36 PM
  4. converting .htm to .php
    By notanotherseo in forum Google Optimization
    Replies: 10
    Last Post: May 16th, 2004, 07:03 PM
  5. ending in a .asp, .php, .jsp, .cfm
    By rustybrick in forum Google Optimization
    Replies: 10
    Last Post: Jun 23rd, 2003, 11:33 PM

IMN logo majestic logo threadwatch logo seochat tools logo