How can I configure Apache to direct requests for particular URL on server to a particular directory, while at the same time transforming how that URL is seen by the script that processes it?
Say I have a php script in the following directory:
I would like all incoming HTTP requests to http://server/foo/* to be processed by /somedir/foo/script.php. However, I would also like the script to know what the remainder of the URI is in the REQUEST_URI variable.
(The * part of the URL is opaque information that is only meaningful to the script, and could be anything)
will be handled by /somedir/foo/script.php, and the script will see the REQUEST_URI as simply "/" and
will also be handled by /somedir/foo/script.php, while REQUEST_URI will be seen as "/the/quick/brown/fox.html"
How do I configure Apache to behave this way?
(Note that this is strictly an Apache question; I do not want to alter the script in any way.)