These days i\'m using Slim Framework as my simplest tool to develop the php web api. Using these two articles:
You're right about to include the index.php on your file, but that happen because you're not working properly with your mod-rewrite Please check the following link:
https://github.com/codeguy/Slim
In the Get Started part you could see how to configure your server (in case that you were using apache / lighttpd / ngynx)