%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home2/rezakur1/ai.rezakurnia.com/zh-router-frontend/dist/
Upload File :
Create Path :
Current File : //home2/rezakur1/ai.rezakurnia.com/zh-router-frontend/dist/.htaccess

# ─── KurniaDev AI Gateway — SPA rewrite ───────────────────────────────
# Semua route (mis. /admin/..., /topup) di-rewrite ke index.html,
# agar refresh halaman tidak 404. Aset nyata (file) tetap dilayani langsung.
<IfModule mod_rewrite.c>
  RewriteEngine On

  # Jika bukan file/direktori nyata → kirim ke index.html
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

# Cache aset statis yang di-hash oleh Vite (nama file mengandung hash)
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
</IfModule>

# Keamanan dasar
<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>

Zerion Mini Shell 1.0