I converted contact.php into contact.html using the following rule: (and the rest of the pages as well)
- Code: Select all
RewriteRule ^(.*).\html$ /$1.php [L]
However, if someone requests contact.php again, I want them redirect to contact.html. If I use the following, it creates loop naturally. Please help.
- Code: Select all
RewriteRule ^(.*).\html$ /$1.php [L]
RewriteRule ^(.*).\php$ /$1.html [R=301,L]