Sometimes you may want to pass the URL that triggered a 404 Not Found
error on your Apache server to a script handling the
error. Of course, you could simply set the ErrorDocument 404 /path/to/error/script
directive and access the environment
variables set by the directive to retrieve the requested URL. But what if this is not an option and you want the requested URL as
a parameter when calling the script (see below for an example where this might be useful)? Unfortunately, the ErrorDocument
does not allow rewriting the URL...
We could simulate the ErrorDocument 404
behavior using the rewrite
module. Since we do not want to hardcode any URLs into