I have a php site. For all of the page links I use foo.htm, and internally rewrite this to foo.php with .htaccess:
RewriteRule ^(.*)\.htm$ $1.php [NC,L]
This works great - however, it still allows you to use the foo.php url. I would like to 301 redirect foo.php to foo.htm to prevent any old foo.php search engine results from hanging around and rewrite the foo.htm url internally to foo.php
I can't figure out how to do this without creating a loop.