try to add 'api/' to index.php and general call to index.html