htaccess redirect all html files

Posted by

If you really want to redirect requests of /some_page.html to /some_page/:

RewriteRule (.+).html$ /$1/ [L,R]

But if you want to reverse (redirect requests of /some_page/ to /some_page.html):

RewriteRule (.+)/$ /$1.html [L,R]

For a permanent redirect, use R=301 instead of R. And for just an internal rewrite, use the rule without R flag.