Differences between revisions 2 and 3
Revision 2 as of 2008-12-31 18:41:02
Size: 867
Editor: RichBowen
Comment: Remove unnecessary RewriteCond directives, and make the RewriteRule actually wo.
Revision 3 as of 2009-09-20 22:13:30
Size: 869
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
The above ruleset causes all URLs, except those for the /images and /css directories, to be proxied through to another server, running on port 90. The ProxyPassReverse directive is to ensure that redirects returning from that server are correctly passed back to the client. (See [http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypassreverse the ProxyPassReverse documentation] for more details.) The above ruleset causes all URLs, except those for the /images and /css directories, to be proxied through to another server, running on port 90. The ProxyPassReverse directive is to ensure that redirects returning from that server are correctly passed back to the client. (See [[http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypassreverse|the ProxyPassReverse documentation]] for more details.)
Line 13: Line 13:
'' Back to ["RewriteFlags"] '' '' Back to [[RewriteFlags]] ''

The P flag causes the resulting URL to be requested by proxy, using mod_proxy. This allows for complex proxying of content to a variety of back-end servers. You do need to have mod_proxy installed in order to use the [P] flag.

RewriteEngine On
RewriteRule ^(/(images|css).*)$ http://other.server.com:90$1 [P]
ProxyPassReverse / http://other.server.com:90/

The above ruleset causes all URLs, except those for the /images and /css directories, to be proxied through to another server, running on port 90. The ProxyPassReverse directive is to ensure that redirects returning from that server are correctly passed back to the client. (See the ProxyPassReverse documentation for more details.)

The more verbose [Proxy] syntax is also permitted.

Back to RewriteFlags

RewriteFlags/P (last edited 2009-09-20 22:13:30 by localhost)