I am trying find out how to redirect all traffic on a website from any .htm address to a .php version of the page. I am hoping it will be a .htaccess rule but I have not bee
RewriteEngine on RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC] RewriteRule ^ /%1.php [NC,L,R]
This will redirect file.html to file.php without causing an infinite looping error.
This will do the job in your .htaccess file:
RedirectMatch 301 (.*)\.htm$ $1.php