+ Reply to Thread
Results 1 to 5 of 5

 

Thread: Changing site from .htm to .php

  1. #1
    This is the one

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    2,881
    Thanks
    29
    Thanked 9 Times in 7 Posts


    I have one of my original sites that needs changing as I made it with .htm file names.
    Anyway, I have put off for years changing it but I think it's come to a time now where I really need to change it to .php.

    Now obviously I know how to just re-save the files as .php is simple enough, but what else do I need to do to make sure nothing goes wrong. Obviously I want to do it the most search engine friendly & user friendly way so not to lose rankings etc.

    So, can anyone throw down the best method of attack to make sure all goes smoothly please?!

    Cheers
    Wardy

  2. #2
    Registered User

    Status
    Offline
    Join Date
    Aug 2006
    Location
    Hadleigh, Suffolk, UK
    Posts
    954
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Wardy View Post
    I have one of my original sites that needs changing as I made it with .htm file names.
    Anyway, I have put off for years changing it but I think it's come to a time now where I really need to change it to .php.

    Now obviously I know how to just re-save the files as .php is simple enough, but what else do I need to do to make sure nothing goes wrong. Obviously I want to do it the most search engine friendly & user friendly way so not to lose rankings etc.

    So, can anyone throw down the best method of attack to make sure all goes smoothly please?!

    Cheers
    Wardy
    Not sure I know what you mean...
    If you want to use the features of PHP, without loosing any rankings/effecting anything at all, then just change apache config to parse .htm files as php.
    Then start adding PHP code to the files as you like...
    Alternatively rename everything to .php, and setup some aliases/redirects etc in the config, so that the old files eg start.htm gets rewritten or redirected to start.php

    I think you need to say why you want to convert to php in the first place...

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Feb 2006
    Location
    Gillingham
    Posts
    510
    Thanks
    0
    Thanked 4 Times in 1 Post
    Not too sure if this is the best approach but I would suggest using an htaccess rewrite rule to permanently redirect all requests to *.htm to the equivalent *.php.
    They came for my 404 and I said nothing

  4. #4
    This is the one

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    2,881
    Thanks
    29
    Thanked 9 Times in 7 Posts
    Quote Originally Posted by axod View Post
    I think you need to say why you want to convert to php in the first place...
    Currently the site is a bit of a pig to make chances across the whole site, as I said it was my first site from many years ago and as such is not very easy to make changes across the whole site as each page needs individually changing as it stands if I want to change the menu etc.
    The site is going to be re-designed and I want it to build it in .php as that is what I create most of my sites in now, making it easier to make things dynamic instead of static and opens up being able to do lots of other stuff to the site to try and take it forward.

    Basically filenames will remain the same (other than changing from mysite.com/mypage.htm to mysite.com/mypage.php) but I want to make sure when I do the change over I do so in the ebst way to avoid any errors both to the site and SE rankings

    Cheers
    Wardy

  5. #5
    Registered User

    Status
    Offline
    Join Date
    Apr 2005
    Location
    Buffalo, NY USA
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'd just add to htaccess:

    AddType application/x-httpd-php .php .htm

    Then you don't have to worry about redirecting pages that are already bookmarked or in search engines, and can begin using php in your .htm files.
    Eric

+ Reply to Thread


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Astrobingo Testimonials
    By jess1 in forum Paid On Results
    Replies: 0
    Last Post: 24-08-05, 08:03 PM
  2. Negative Site Feedback
    By bulbo in forum Affiliate Marketing Lounge
    Replies: 37
    Last Post: 15-05-04, 07:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2