Options -Indexes
RewriteEngine On

<FilesMatch "^\.">
  Require all denied
</FilesMatch>

RewriteRule ^api(?:/.*)?$ api/index.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.html [L]
