What is the best way to redirect htm to php?

5 replies
  • SEO
  • |
Hi

I have a site I am redoing completely and the new site is a php site. The old site is a htm site

As I want to keep any page rank and link relevancy that exists for all the htm pages I am trying to learn the best way to redirect the internal pages.

There are only 5 pages involved.

The new pages are not having the same urls
old page: /products recently sold.htm will be replaced by:
new page /site_gallery.php

Currently I have placed a meta code redirect in each htm page redirecting to its php equvilent.

Does any one know if this will be effective from a search engine listing position?

Is there a better way to do this?

All ideas appreciated. Thanks for your time in advance

Regards

Mark
#htm #php #redirect
  • Profile picture of the author Canada
    You'd be much better off doing a 301 redirect within the .htaccess file. That way, you're telling the SEs that the page has moved permanently.

    Syntax is (off the top of my head)

    Redirect 301 /products recently sold.htm hxxp://www.yoursite.com/site_gallery.php
    Signature
    YourNichePLR.com - Fresh new PLR site ala Tiffany Dow's PLR ATM.
    50% Off Everything In Your Cart until November! Sign Up and be Notified when New PLR packs are uploaded. Right now we've got acid reflux, kittens, and hair styling packs available.
    {{ DiscussionBoard.errors[337093].message }}
  • Profile picture of the author askloz
    use the header location php redirect.
    Signature
    {{ DiscussionBoard.errors[337094].message }}
  • Profile picture of the author keepitsimple
    Thanks for the replies

    Canada, I thought of a 301 in the .htaccess file but I didn't know that I could write a separate syntax for each page.

    Loz, that's a new one on me. I have just done a bit of Googling on the comparison between a php redirect and a meta refresh. Lots of examples come up but I haven't found any one giving a clear benefit of one over the other.

    I'll do some experimenting and ley you know how I get on

    Mark
    Signature

    Don't forget your dreams

    {{ DiscussionBoard.errors[337174].message }}
  • Profile picture of the author Julian X
    use this javascript code:
    Code:
    <script type="text/javascript">
    <!--
    window.location = "http://www.newsite.com/"
    //-->
    </script>
    Best Regards,
    Bemodo
    {{ DiscussionBoard.errors[337290].message }}
    • Profile picture of the author keepitsimple
      Originally Posted by bemodo View Post

      use this javascript code:
      Code:
      <script type="text/javascript">
      <!--
      window.location = "http://www.newsite.com/"
      //-->
      </script>
      Best Regards,
      Bemodo
      I haven't seen this before.

      Would you mind sharing the benefits of this javascript over a php redirect or meta refresh?

      Thanks for sharing

      Mark
      Signature

      Don't forget your dreams

      {{ DiscussionBoard.errors[337396].message }}

Trending Topics