I am trying to figure out how to redirect all traffic to a website from any .htm address to a .php version of a page. I hope this will be the .htaccess rule, but I could not find anything that works for me, but I am not the best with .htaccess.
Any help is greatly appreciated.
This will do the job in the .htaccess file:
RedirectMatch 301 (.*)\.htm$ $1.php
RewriteEngine on RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC] RewriteRule ^ /%1.php [NC,L,R]
This will redirect file.html to file.php without causing an endless loop error.
Source: https://habr.com/ru/post/1783772/More articles:How to make sure that the object does not go out of the visible range -> opengl-> c - cHow can I set a local branch to pull / merge from a specific remote branch? - gitC command line password - cHow do I tell gcc to reduce typecasting restrictions when calling a C function from C ++? - c ++What is the βrightβ way to get a link to a tape object? - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1783773/limit-website-access-to-one-computer&usg=ALkJrhg0FH7wBbYejkSMAhALi_pEwtMc-wKRL - How do you get the value of the observed field? - krlShould we use MS Team Foundation Server if we are not using VS? - tfsWhat happens to the z-indexing of inputs here in IE8? - htmlDesigning an Intermediate View for the Compiler - compiler-constructionAll Articles