Options -Indexes
AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{QUERY_STRING} (^|&)v=20260710 [OR]
  RewriteCond %{QUERY_STRING} (^|&)v=20260714 [OR]
  RewriteCond %{QUERY_STRING} (^|&)v=20260715-hotfix
  RewriteRule ^(index|painel|blocos|execucao|execucao-blocos|frequencia|frequencia-relatorio|usuarios)\.html$ login.html?v=20260715-secure1 [R=302,L]
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(html|js|css)$">
    Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
    Header set Pragma "no-cache"
    Header set Expires "0"
  </FilesMatch>
</IfModule>

<IfModule mod_mime.c>
  AddCharset UTF-8 .html .css .js .json .php
</IfModule>

<FilesMatch "^(cadastro\.html|cadastro-posicoes\.js|api_codigo\.gs|script\.js|controle\.html)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
  </IfModule>
</FilesMatch>

<FilesMatch "\.(sql|zip|xlsx?|csv|gs|txt|md)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
  </IfModule>
</FilesMatch>

<Files "config.php">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
  </IfModule>
</Files>
