Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: mademetop
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.
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.