DirectoryIndex index.php

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule .? - [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^api/.* /api.php [L]

    RewriteRule .? /index.php [L]
</IfModule>
