I would like to quickly set up a RESTful site using PHP without learning a PHP Framework. I would like to use a single .htaccess
-file in Apache or a single rule using Nginx, so I easyli can change web server without changing my code.
So I want to direct all requests to a single PHP-file, and that file takes care of the RESTful-handling and call the right PHP-file.
In example:
- The user request http://mysite.com/test
- The server sends all requests to
rest.php
- The
rest.php
calltest.php
(maybe with a querystring).
If this can be done, is there a free PHP-script that works like my rest.php
? or how can I do this PHP-script?