Options -Indexes

ErrorDocument 404 /404.html

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.html [NC,L]

#   O P T I M I Z E
<If "%{REQUEST_URI} =~ m#(assets|files|images)/(.+)$#">
    <IfModule mod_expires.c>
        ExpiresActive on

        ExpiresByType image/jpg “access plus 7 days”
        ExpiresByType image/png “access plus 7 days”
        ExpiresByType application/javascript “access plus 1 days”
        ExpiresByType text/javascript “access plus 1 days”
        ExpiresByType text/css “access plus 1 days”
    </IfModule>
</If>
<Else>
    <IfModule mod_http2.c>
        H2PushResource /assets/css/main.css
    </IfModule>
</Else>