I am going to change the file extension from ".htm" to ".php", is there any disadvantage with this action?
migrated from stackoverflow.com Apr 2 '11 at 1:51
This question came from our site for professional and enthusiast programmers.
Yes. If you change the file extension of a live site the following consequences will occur:
Fortunately all this is easy to solve. You can do a 301 redirect from the old URLs to the new URLs. This is very easy if the file names are staying the same and only the file extensions are changing. To do the 301 redirect for your pages just create a file called .htaccess and place it in your root directory. Place this inside of it:
What this does is tell the search engines, and web browsers, that your pages have moved and where to find them (it tells them that the pages that ended with .htm now end with .php). The search engines will then update their indexes with the new pages and also credit whatever links you have to the old URLs to the new URLs (although a small amount of those links' value is lost). Web browser will automatically redirect the user to the new page and they won't even know it happened.
FYI, file extension does not affect your rankings. In other words, .php is not better or worse then .html or .aspx, etc. (Actually if someone is searching for "php" you'll notice Google will highlight the file extension in the search results. But if this is a factor in their rankings it probably is a small one).
John's answer says it all but I would like to ask you yet another question - what is the point? There are at least two reasons for which you should stick with
I recommend to stick with