RewriteProxy directive
| Description: |
Proxy request to a distant server |
| Syntax: |
RewriteProxy Pattern Substitution [flags] |
| Context: |
server config, virtual host, directory, .htaccess |
Causes the resulting URL to be internally treated as a target on another server
and immediately (i.e. rules processing stops here) passed to the remote server.
Response of the remote server will then be passed back to the client. Proxy
requires you to specify fully qualified URL, starting from protocol, host name,
etc. ISAPI_Rewrite uses ISAPI extension to handle proxy requests. You can read
more about this in configuring proxy chapter.
Syntax and operation is the same as for RewriteRule
directive, but RewriteProxy directive supports some additional flags:
- H (preserve Host)
Proxy module will use Host header sent in original request when connecting
to remote server. Without this flag proxy will compose Host header from a
host name and a port of a remote server.
- CR (use Credentials)
Proxy module will try to login on a remote server with the credentials specified
in the URL or basic authentication headers. With this flag you can use http://user:password@host.com/path/
syntax as a URL within substitution string.