<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Options -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^api/(check|health|issue|parse|public-key|trial)$ api.php?action=$1 [QSA,L]
RewriteRule ^api/debug$ debug.php [QSA,L]
RewriteRule ^api\.php$ api.php [L]
</IfModule>
<FilesMatch "^(config\.php|db\.php|crypto\.php|license\.php|setup_state\.php|setup_db\.php|migration\.sql|database\.sqlite|\.htaccess|README\.md)$">
Require all denied
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteRule ^keys/ - [F,L]
RewriteRule ^data/ - [F,L]
</IfModule>
<FilesMatch "\.(pem|key|sqlite)$">
Require all denied
</FilesMatch>
