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 I’m less familiar with PHP but I haven’t yet seen anything that does quite the same thing with PHP (or mod_php). It’s entirely possible that I’m missing something simple.
How do you do this in PHP?
One of the reasons I want to do this is ‘one use’ URLs. Now this can sorta be done with GET parameters (like an MD5 hash token) but I’m interested in URL mapping as a general solution to many problems.
Another big reason to use something like this is to have RESTful URLs.
With Apache, you are able to setup URL Rewriting for your php pages with mod_rewrite, check this resources: