I am trying to forward all requests to a particular hostname to a specific URL.
My virtual host entry looks like:
<VirtualHost *:80> ServerName test.example.com RedirectPermanent / http://another.example.com/path/ </VirtualHost>
This works for anyone going to http://test.example.com. I am trying to add an error handler:
ErrorDocument 404 http://another.example.com/path/
so that any and all requests go to the same server. The problem is that if I request http://test.example.com/foo then the end result is a request to http://another.example.com/path/foo. I tried setting the error document to http://another.example.com/path? but it ignored the ? and still redirected to /path/foo
How do I prevent the path from being added to the error URL?