Options -Indexes
RewriteEngine On
RewriteBase /
RewriteRule ^(?:config\.php|\.env|storage/|database/|app/|admin/).*$ - [F,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
<FilesMatch "\.(?:log|sql|lock|json)$">
  Require all denied
</FilesMatch>
<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"
 Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
 Header set Cache-Control "public, max-age=604800" "expr=%{REQUEST_URI} =~ m#\.(?:css|js|mjs|svg|webp|avif|png|jpg)$#"
</IfModule>
<IfModule mod_deflate.c>
 AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/json application/xml image/svg+xml
</IfModule>
