Use same concept as Slim
Make it compatible with Apache installation and php embedded server
Use parse_url
Merge pull request #5 from trecouvr/master

Use same concept as Slim