Add api.php and remove index.php