Options -Indexes
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R,L,NC]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_FILENAME}.html [L]
In my website I am using this .htaccess code to remove .html extensions from url. It works fine in some urls but it gives 403 forbidden error in some urls. I checked file permissions of these urls. Those are ok 0644.