# MSF Careers PH — static Next.js export (cPanel / Apache)
DirectoryIndex index.html
Options -MultiViews

<IfModule mod_mime.c>
  AddType application/javascript .js
  AddType text/css .css
</IfModule>

<IfModule mod_rewrite.c>
  RewriteEngine On

  # Never rewrite Next.js assets (required for animations / React hydration)
  RewriteRule ^_next/ - [L]

  # Serve real files and directories as-is
  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^ - [L]

  # SPA fallback for exported routes
  RewriteRule ^ index.html [L]
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(html)$">
    Header set Cache-Control "no-cache"
  </FilesMatch>
</IfModule>
