+ Reply to Thread
Results 1 to 4 of 4

 

Thread: Changing fom .html to .php

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Jun 2004
    Location
    Yorkshire
    Posts
    136
    Thanks
    2
    Thanked 1 Time in 1 Post


    Hi all,

    I am currently changing some older html pages to include some
    new features. The pages are well indexed in Google at the moment so
    I don't really want to loose the positions by changing the extension to
    .php

    I could do a redirect 301 but although that would help i'd probably loose
    the page rank.

    I'm using a Linux server and wanted to try including this in a .htaccess
    file:

    Code:
    AddType application/x-httpd-php .html
    I believe doing this will allow PHP commands to be run in the .html file
    as if they were in a .php file.

    Has anyone used the above and had problems?? Don't want to mess up
    my google position so thought i'd ask first

    Thanks in advance.

    Cheers

    Steve

  2. #2
    Keith's Avatar
    Moderator

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Richmond North Yorkshire
    Posts
    2,540
    Thanks
    172
    Thanked 119 Times in 83 Posts
    I use

    AddHandler application/x-httpd-php .html

    had no problems
    Keith ~ My Blog general ramblings. Internet Marketing Blogs UK all the blogs together in one place (pm for inclusion)

  3. #3
    Ian Ebbs

    Status
    Offline
    Join Date
    Aug 2003
    Location
    England
    Posts
    1,096
    Thanks
    5
    Thanked 6 Times in 2 Posts
    Depending on how your site is set up different variants will work for you. I'll give you what I use nowadays it should work:

    Code:
    RemoveHandler .html .htm
    AddHandler application/x-httpd-php .php .htm .html
    Then you'll be fine with your pages. If it doesn't work you'll be able to see that and take it off. Just give it a try and see.

    If it looks fine to you in your web browser then it will look the same to Google.

    affiliates4u Fantasy Football Winner 2007/08

  4. #4
    Registered User

    Status
    Offline
    Join Date
    Jun 2004
    Location
    Yorkshire
    Posts
    136
    Thanks
    2
    Thanked 1 Time in 1 Post
    Thanks guys for the prompt replies - appreciated!!

    I guess you learn something new everyday - I didn't know that it could
    be done this way - it certainly saves me a bit of work and am glad that
    my Google position won't be effected.

    Cheers

    Steve

+ 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. .htm and .php versions of the same site
    By sham in forum Programming
    Replies: 3
    Last Post: 29-05-05, 04:05 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