# ══════════════════════════════════════════════════════
# REPLICA GALLERY — Multi-Page .htaccess
# ══════════════════════════════════════════════════════

Options -MultiViews
RewriteEngine On

# ── CLEAN URL REWRITES ─────────────────────────────────
# /about              → /about.html
# /industries         → /industries.html
# /why-replica-food   → /why-replica-food.html
# /cuisines           → /cuisines.html
# /blog               → /blog.html
# /contact            → /contact.html
# /blog/slug          → /blog/slug.html

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ /$1.html [L,QSA]

# ── PERFORMANCE ───────────────────────────────────────
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html              "access plus 1 hour"
  ExpiresByType text/css               "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType image/jpeg             "access plus 1 year"
  ExpiresByType image/png              "access plus 1 year"
  ExpiresByType image/webp             "access plus 1 year"
  ExpiresByType font/woff2             "access plus 1 year"
</IfModule>

# ── COMPRESSION ───────────────────────────────────────
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript
</IfModule>

# ── SECURITY ──────────────────────────────────────────
<IfModule mod_headers.c>
  Header set X-Content-Type-Options "nosniff"
  Header set X-Frame-Options "SAMEORIGIN"
  Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# ── FORCE HTTPS (uncomment after SSL is active) ───────
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# ── 404 ERROR PAGE ────────────────────────────────────
ErrorDocument 404 /404.html
