# Miss Nail - public/.htaccess (document root yang disarankan)
Options -Indexes -MultiViews
DirectoryIndex index.php

<IfModule mod_rewrite.c>
  RewriteEngine On
  # Semua yang bukan file nyata -> front controller
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L,QSA]
</IfModule>

<IfModule mod_headers.c>
  Header always set X-Content-Type-Options "nosniff"
  Header always set Referrer-Policy "same-origin"
  Header always set X-Frame-Options "DENY"
  <FilesMatch "\.(css|js|svg|png|woff2)$">
    Header set Cache-Control "public, max-age=2592000"
  </FilesMatch>
</IfModule>

<IfModule mod_mime.c>
  AddType image/svg+xml .svg
  AddType font/woff2 .woff2
  AddType application/manifest+json .webmanifest
</IfModule>

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml
</IfModule>

# File tersembunyi (.env, .git, dll) tidak boleh diakses
<FilesMatch "^\.">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
  </IfModule>
</FilesMatch>
