Hello, I have a site that is all made with the .htm extention however, with moving times and wanting to do more with the site I would like to change it all to .php but was wondering if it is possible to use a .htaccess file to make all the new .php pages appear as .htm so they are all still cached and ranked by search engines?
php is indexed and you should use html. How do you think this site is indexed. php code just tells the server to execute that code before doing anythibg else and can be inserted anywhere n html/htm.
Try putting this in your .htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.*)\.htm $1.php [L]
I think this poster was having similar problems to you, check the thread out. http://forums.digitalpoint.com/showthread.php?t=192219
Hello, gobbly2100. You don't need "to make all the new .php pages appear as .htm" because PHP pages are crawled, cached, etc. the same as *.html pages. What you must worry about is that pages that are already crawled and indexed don't give a 404 error when you do the replacement. To achieve this, the way is to use the Redirect directive in the htaccess file. Best regards.