DirectoryIndex index.html
Options -Indexes

# Força HTTPS (desative as 3 linhas abaixo se o site ainda não tiver SSL)
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Protege o arquivo de configuração e as funções internas
<FilesMatch "^(config|comum)\.php$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
  </IfModule>
</FilesMatch>

# Compressão (deixa o site mais rápido)
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json
</IfModule>

# Não guardar a página em cache (para sempre abrir a versão mais nova)
<IfModule mod_headers.c>
  <FilesMatch "\.html$">
    Header set Cache-Control "no-cache"
  </FilesMatch>
  Header set X-Robots-Tag "noindex, nofollow"
</IfModule>
