Greetings!
I\'m trying to replace .php extensions with .html
So far I got:
RewriteRule ^(.*)\\.html $1.php
... it works n
RewriteRule ^(.*)\.php $1.html [R=301,L]
RewriteRule ^(.*)\.html $1.php
edit after pulling white rabbit out of the hat
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} (.*)\.php
RewriteRule ^(.*)\.php $1.html [R=301,L]
RewriteCond %{THE_REQUEST} (.*)\.html
RewriteRule ^(.*)\.html $1.php [L]
Give this a try:
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.html$ $1.php [L]
I think that this is much simple
AddType application/x-httpd-php .html
it just process every .html file as normal .php
if you want it only for current dir
<Files *.html>
ForceType application/x-httpd-php
</Files>
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} (.*)\.php
RewriteRule ^(.*)\.php $1.html [R=301,L]
RewriteCond %{THE_REQUEST} (.*)\.html
RewriteRule ^(.*)\.html $1.php [L]