I am about to switch from static(.htm) to dynamic(.php). As I now have high SE rank directly to my static pages for each of my important keywords, I wanted to do a 301 redirect from each of those pages. My host (Windows) sent the following message: "You cannot perform a 301 redirect based on the extension (.htm, static pages) requested by visitor from the web server." They suggest a custom 404 page redirecting to the new "main.php", but this is not how I want to do it. Is this a problem with my host that I should consider moving to a new one or what?
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.
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]