<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Enable SSL
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/robots.txt$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
# Trim slashes
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [R=301,L]
# Hide .html extension
RewriteRule ^([^\.]+)$ /$1.html [NC,L]
</IfModule>