Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Header always set Content-Security-Policy "upgrade-insecure-requests;" RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html [L] RewriteCond %{THE_REQUEST} ^(?:GET|POST)\ /.*\.html\ HTTP.*$ [NC] RewriteRule ^(.*)\.html$ $1 [R=301,L]