# Semua request diarahkan ke index.php (router PHP native)
Options -Indexes
RewriteEngine On
RewriteBase /api/

# Header Authorization dibutuhkan beberapa hosting cPanel
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

# File sensitif tidak boleh diakses langsung
<FilesMatch "^(config\.php|config\.sample\.php|bootstrap\.php)$">
  Require all denied
</FilesMatch>
