My intent is to rewrite urls ending in .html to .php (not actually all of them, but that shouldn't really matter with regard to this question). I'd also like to disallow urls ending in .php (so that the user can access every page only using urls with .html extension).
I'm using these rules inside .htaccess:
RewriteRule ^(.*)\.php$ $1.html [R,L]
RewriteRule ^(.*)\.html$ $1.php [L]
However, this causes a redirection loop. I suppose this happens because the rewritten .html to .php url is fed back to mod_rewrite and causes the first rule to trigger.
Can anyone help me?