Options -Indexes # ── Routing: clean URLs ────────────────────────────────────────── RewriteEngine On # www → non-www redirect RewriteCond %{HTTP_HOST} ^www\.quantumtaskai\.com [NC] RewriteRule ^(.*)$ https://quantumtaskai.com/$1 [R=301,L] # Serve .html files without extension RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^(.*)$ $1.html [L] # ── Custom 404 ──────────────────────────────────────────────────── ErrorDocument 404 /404.html # ── Security headers ───────────────────────────────────────────── Header always set X-Frame-Options "SAMEORIGIN" Header always set X-Content-Type-Options "nosniff" Header always set X-XSS-Protection "1; mode=block" Header always set Referrer-Policy "strict-origin-when-cross-origin" Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()" # ── Caching: HTML (1 hour) ────────────────────────────────────── Header set Cache-Control "public, max-age=3600, must-revalidate" # ── Caching: Static assets (1 year) ──────────────────────────── Header set Cache-Control "public, max-age=31536000, immutable" # ── Caching: JS (1 year) ──────────────────────────────────────── Header set Cache-Control "public, max-age=31536000, immutable" # ── Caching: shared-header.js (1 hour — overrides JS rule above) Header set Cache-Control "public, max-age=3600, must-revalidate" # ── Gzip compression ───────────────────────────────────────────── AddOutputFilterByType DEFLATE text/html text/plain text/css AddOutputFilterByType DEFLATE application/javascript application/json AddOutputFilterByType DEFLATE image/svg+xml