# Static Next.js export on Apache (Hostinger).
Options -Indexes
ErrorDocument 404 /404.html

<IfModule mod_headers.c>
    # Hashed build files never change; pages must always be fresh so a new deploy is picked up.
    <FilesMatch "\.(js|css|woff2)$">
        Header set Cache-Control "public, max-age=31536000, immutable"
    </FilesMatch>
    # config.js is edited on the server, so it must never be cached.
    <FilesMatch "^config\.js$">
        Header set Cache-Control "no-cache"
    </FilesMatch>
    <FilesMatch "\.(html|txt)$">
        Header set Cache-Control "no-cache"
    </FilesMatch>
</IfModule>
