# Insolar Brasil — fallback para SPA em Apache/cPanel
Options -MultiViews
DirectoryIndex index.html

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # Arquivos e pastas existentes continuam sendo servidos normalmente.
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]

  # Qualquer rota do site volta para o app React.
  RewriteRule ^ index.html [L]
</IfModule>

<IfModule mod_mime.c>
  AddType application/javascript .js
  AddType video/mp4 .mp4
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|mp4)$">
    Header set Cache-Control "public, max-age=604800"
  </FilesMatch>
</IfModule>
