301 Redirect all posts urls from .html to / (without .html)

it’s curious that redirect_canonical doesn’t work in this case, but this will redirect everything with .html via .htaccess:

RewriteRule (.+)\.html?$ http://example.com/$1/ [R=301,L]

but keep in mind this will redirect everything with .html, you may need to explicitly exclude things.

error code: 523