Welcome to WebmasterWorld Guest from 184.73.126.70

Forum Moderators: mademetop

Message Too Old, No Replies

Best Solution while migrating the HTM site to PHP with out losing SE ranking

Best Solution while migrating the HTM site to PHP with out losing SE rankin

   
6:54 pm on Nov 14, 2008 (gmt 0)

5+ Year Member



Hi every body,

We are in process of migrating our 100+ pages website from .htm to .php. But we do not want to lose our url’s trailing with .htm since we have good search engine ranking for that. We did some research and found three solutions for this and seeking suggestion from the experts to know which is best.

1, URL rewriting:
Rewrite the .php url to .htm.
Ex: www.example.com/good-ranking.php can be accessed as www.example.com/good-ranking.htm. This way still old url’s will be alive.

2, 301 redirecting.
Redirect all the old url’s to new .php url’s by 301 redirection.

3, parsing php script in htm
Configuring the apache handler to run php scripts in htm pages. By this way all the php pages will be renamed as .htm and uploaded in the server as it will work with out any hassles. Is there any negative impact of using this?

If this is the situation for you which option you will use and why?
If your method is not listed here then plz share that with us. Looking forward to hear from all the experts who read this post. Thanks.

12:29 am on Nov 16, 2008 (gmt 0)

5+ Year Member



Method #1 - No, this could get you into duplicate content issues with SE's
#2 and #3 both look good to me.
1:50 am on Nov 16, 2008 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'll take door number 4, if you don't mind...

4. Link to the new pages as "page-name", not "page-name.html" or "page-name.php". Then internally rewrite those extensionless URLs to php and/or html files as appropriate. Finally, 301-redirect the old URLs to the new extensionless URLs to recover your existing PageRank/Link-popularity.

In this way, you will never have to deal with the issue of a server technology change affecting your URLs again.

Note that URLs and filenames are two different resource-location mechanisms, for use on the Web and inside the server's filesystem, respectively. The resource names used by these two mechanisms need not be equivalent or even directly-related; You can use Apache mod_rewrite or ISAPI Rewrite on IIS to "associate" URLs with seemingly-unrelated filenames.

In this case, the simplest approach is simply to drop the "file type extension" from the URL. Tis will result in retention of any keyword-in-URL factors you may currently have, and simply both the on-page-link conversion process and the URL-to-filename rewriting code.

A word from Sir Tim Berners-Lee [w3.org], inventor of the hyperlink.

By the way, a common error is to link to "page-name/" rather than simply to "page-name". This is unnecessary and possibly confusing since in HTTP, a trailing slash indicates a directory listing or a directory index page, while the absence of a trailing slash indicates a page.

Jim