# Route every /api/* request through api/index.php
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/api/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /api/index.php [QSA,L]

# Never serve config.php or db.php directly
<FilesMatch "^(config|db)\.php$">
	Require all denied
</FilesMatch>

