# Route every /api/v1/... request to the front controller.
# Most shared hosting (cPanel/Apache) has mod_rewrite on by default.
# If /api/v1/... URLs 404 after upload, ask your host to enable mod_rewrite,
# or confirm AllowOverride is set to "All" for your account.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^api/v1/(.*)$ api/index.php [QSA,L]

# Never let visitors browse to config.php's raw source if the server
# is ever misconfigured to not execute .php files in some sub-path.
<Files "config.php">
  Order allow,deny
  Deny from all
</Files>
