Apache Reference: mod_proxy, ProxyPassReverse

ProxyPassReverse

Adjust HTTP Redirect Responses
Syntax: ProxyPassReverse local-path A
Example: ProxyPassReverse /foo/ http://www.foo.dom/
Since: Apache 1.3

This mod_proxy directive adjusts the URL in the Location header field on HTTP redirect responses sent by remote hosts. This adjustment is essential, for instance, when Apache is used as a ``reverse proxy''. In this case, it avoids by-passing the reverse proxy because HTTP redirects on the back-end servers stay behind the reverse proxy. The local-path argument is the name of a local virtual path, and the remote-url argument is a partial URL for the remote server - just as with the ProxyPass directive. Usually, the directive is used in conjunction with ProxyPass, but it can ProxyPassReverse also be used in conjunction with the proxy flag of mod_rewrite's RewriteRule directive.