RewriteEngine on
RewriteRule ^api.*$ index.php [L]
RewriteRule ^.*$ index.html
RewriteEngine On
RewriteCond %{ENV:REDIRECT_FINISH} !^$
RewriteRule ^ - [L]
RewriteRule ^api($|/+.*$) index.php [E=FINISH:1,L]
RewriteRule ^.*$ index.html [E=FINISH:1,L]
RewriteEngine On
RewriteBase /
RewriteRule ^api.*$ index.php [L]
RewriteRule ^.*$ index.html