I come from a Java background and with any servlets-based technology, it\'s trivial to map a range of URLs (eg /reports/, /secure/.do) to a specified servlet. Now
A trick I use is the $ _ SERVER['PATH_INFO'] (I think you need Apache). This gets you all of the information after the PHP file extension.
http://www.example.com/page.php/rest/url
the $ _ SERVER['PATH_INFO'] will contain:
"/rest/url"
The page can then redirect, process some code or whatever based on that string.
This is good if you don't have access to the Apache Configs or .HTACCESS, Also if things change you can make page.php a directory name for static file placement. Oh and PHP doesn't need to have a .php extension. I've used .api or somesuch in the past.
http://www.example.com/worker.api/rest/url
That seems to work well for me.