Options -Indexes

# Block direct access to auth and db helpers
<FilesMatch "^(auth|db)\.php$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# Allow all other PHP files
<FilesMatch "\.php$">
    Order Allow,Deny
    Allow from all
</FilesMatch>

# Handle OPTIONS preflight
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule .* - [R=200,L]
