# Nunca servir a configuração
<FilesMatch "^config(\.example)?\.php$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
  </IfModule>
</FilesMatch>

Options -Indexes
DirectoryIndex index.php login.php

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Bloqueio relativo à pasta da aplicação (funciona em subdiretório)
  RewriteRule ^(inc|dados|sql|logs)/ - [F,L]
  # HTTPS obrigatório: o cookie de sessão e o webhook dependem disso
  RewriteCond %{HTTPS} off
  RewriteCond %{HTTP_X_FORWARDED_PROTO} !https
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
