Results 1 to 4 of 4

 

Thread: .htm and .php versions of the same site

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Jan 2004
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts


    Over the past 2 months I have updated my site from .htm to .php, to make it easier to change navigation etc. I now have 2 versions of the same site, the .htm page has PR or 3 or 4, the .php page has a PR of 0. (e.g. www.mysite.co.uk/page1.htm, www.mysite.co.uk/page1.php. My index page only has the .php version of navigation, so visitors only see the php version of the site.

    Q1. What is the best way to migrate from the htm version to the php version and keep the PR.

    Q2. I seem to have been dropped by google, (yahoo and msn ok) is this because google I have duplicate page with the same content (I did make small house keeping and SEO changes during the php update)

    Any help on this would be much appreciated.

  2. #2
    Web monkey

    Status
    Offline
    Join Date
    May 2005
    Location
    Cambridgeshire
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if you have access to your server .htaccess doc (if apache server) the best thing to do is produce a "Redirection".
    If the file names are the same between .php and .html this is only a single line (taking into account that they are all in the root directory of your site:
    Redirect permanent /(.*).html $1.php

    OR you could manualy create a redirect rule for every page: (this is probably the better option!!!!!! but will take you longer to do)

    Redirect permanent /page1.html http://www.yoururlinhere.com/page1.php
    Redirect permanent /subfolder/page2.html http://www.yoururlinhere.com/subfolder/page2.php
    .........etc

    This means:
    Redirect anything ending in {thisword}.html to {thisword}.php
    It will help short term but eventually you may drop your pagerank as the new pages are spidered (if they are basically the same content and code...just changed to a php file...you should retain the same PR but its not gauranteed)
    What you are basically doing is telling the SE spiders that the page has been replaced with another permanently. As soon as your have made this file (or updated an existing one!) you can delette your old pages as anything from a spider to a visitor will automatically see your replacement page when trying to access the old one (the server will forward them automatically)
    Hope this of help and makes sense.

  3. #3
    ShagaaDaggaDoo

    Status
    Offline
    Join Date
    Aug 2003
    Location
    Surrey
    Posts
    1,150
    Thanks
    0
    Thanked 9 Times in 6 Posts
    "What is the best way to migrate from the htm version to the php version and keep the PR."

    The only way to keep your PR is change all the pages back to .html and then add

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

    To your .htaccess and it will parse .html files as .php.

  4. #4
    Registered User

    Status
    Offline
    Join Date
    Jan 2004
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I will turn all my php pages to htm and use that pharsing stuff.

    Thanks for all the advice

    Heres some intstructions of how to makes the changes via Cpanel, if anyone is interested:

    Parsing PHP in .htm/.html files

    To have our servers parse PHP code in your .html and .htm pages you will need to modify the .htaccess file in your public_html folder adding the following lines:

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

    This can be accomplished by modifying the public_html/.htaccess file manually or this can also be done via the MIME Types icon in your Control Panel.

    - Login to your Control Panel
    - Click on the MIME Types icon
    - In the "MIME Type" field type or paste this:

    application/x-httpd-php

    - In the "Extension(s)" field type the extension
    you wish to have parse PHP code (ex: .html)
    - Click the Add button

    You should now see "application/x-httpd-php .html" listed under "User defined MIME types". If you wish to add other extensions repeat the process above for each extension.



Thread Information

Users Browsing this Thread

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

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