| 3:09 pm on Jan 2, 2005 (gmt 0)|
RedirectMatch [httpd.apache.org] in Apache mod_alias or RewriteRule [httpd.apache.org] in Apache mod_rewrite can easily be used to redirect based on filetype. If your host supports either of those modules, you should be able to do this easily.
However, you might consider simply using mod_rewrite to do an internal rewrite from .htm to .php, and leaving your current URLs alone. It's just as easy as redirecting, and has the advantage of not affecting your search listings and visitors' existing bookmarks. Using an internal rewrite, you change the relationship between the publically-visible URL (.htm) and the server filename (.php) that that URL refers to. For an example, you have to look no further than the address bar in your browser right now... This site is dynamic, but presents static URLs for most functions.
| 3:46 pm on Jan 2, 2005 (gmt 0)|
The host is a Windows server. Excuse my ignorance, but will what you suggest work on non-Apache server?
| 4:09 pm on Jan 2, 2005 (gmt 0)|
Maybe you can use
<meta HTTP-EQUIV="Refresh" CONTENT="0; URL=page.php">
in page.html etc until your php pages get indexed (a few months and then .html pages can be removed).
| 4:48 pm on Jan 2, 2005 (gmt 0)|
Sorry, I missed the Windows reference. ISAPI Rewrite is available for Windows servers, but I doubt that your host will support it (it's not included with IIS, and must be purchased).
As much as I dislike meta-refreshes and all the trouble they have caused in the search engines recently, that may indeed be your best bet on a shared Windows hosting account.
| 6:58 pm on Jan 2, 2005 (gmt 0)|
Thanks to you both, I appreciate the quick responses
| 10:16 am on Jan 7, 2005 (gmt 0)|
You can get cheap high quality hosting where questions like these won't arise. I'd seriously consider moving hosts.
| 11:02 am on Jan 7, 2005 (gmt 0)|
Maybe you can ask the host to configure IIS in such a way that it invokes PHP for requests to files ending in .HTML instead of the standard .PHP? Theoretically it should be possible but I have never done so myself. For instructions you could point them here. [php.net]