# ── MAKRUVA WEBSITE — .htaccess ──────────────────────────────
# cPanel / Apache compatible

Options -Indexes

# ── GZIP COMPRESSION ──────────────────────────────────────────
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css text/javascript
  AddOutputFilterByType DEFLATE application/javascript application/json
  AddOutputFilterByType DEFLATE image/svg+xml font/woff font/woff2
</IfModule>

# ── BROWSER CACHING ───────────────────────────────────────────
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html              "access plus 1 hour"
  ExpiresByType text/css               "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
  ExpiresByType image/png              "access plus 6 months"
  ExpiresByType image/jpeg             "access plus 6 months"
  ExpiresByType image/svg+xml          "access plus 6 months"
  ExpiresByType font/woff2             "access plus 1 year"
  ExpiresByType font/woff              "access plus 1 year"
</IfModule>

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

# ── 404 CUSTOM PAGE ───────────────────────────────────────────
ErrorDocument 404 /index.html

# ── HTTPS REDIRECT (aktifkan jika SSL sudah aktif di cPanel) ──
# <IfModule mod_rewrite.c>
#   RewriteEngine On
#   RewriteCond %{HTTPS} off
#   RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# </IfModule>
