I think I had a similar problem. It's a while since I tackled it, so I might
be wrong. In any case, I was having problems doing proxy with a rewritemap.
My reason for wanting to do this was so I could use the weighting feature of
rewritemaps to do weighted load balancing between frontend and backend
apaches.
I mailed Engelschall, but I hear he gets so much mail about mod_rewrite that
it takes him years to respond.
In any case, I have a patch to mod_rewrite that fixed the problem for me.
The breakdown of the issue was that mod_rewrite wouldn't do a proxy on a
subrequest.
Be warned: I think this patch causes problems with the automatic adding of
trailing /'s on URLs.
Tom
On Tue, May 14, 2002 at 12:19:44PM -0400, Perrin Harkins wrote:
> mire wrote:
> > I have code like this:
> >
> > RewriteEngine On
> >
> > RewriteLog "/var/site/rewrite.log"
> > RewriteMap lb prg:/tmp/lb
> >
> > RewriteRule ^/trta$ http://${lb:prvi|drugi} [proxy,last]
> >
> > and a perl script (a copy from mod_proxy manual) but it doesn't work, it seems
> > like perl script is waiting indeffinetly for input.
>
> Sorry, this is not a mod_perl problem. You should try the general
> Apache user mailing lists, or see if there's a list or newsgroup for
> mod_rewrite.
>
> - Perrin
--
Tom Lancaster Red Hat, Inc.
[EMAIL PROTECTED] (510)-986-8770 x 354
This patch is necessary to allow rewriterules to be applied to subrequests when
they are meant to be proxied. We need this to allow mod_include to get
/apps/include/pane.html from the app servers by proxy.
--- apache_1.3.19/src/modules/standard/mod_rewrite.c.proxy-subreq Wed Jan 31
20:12:26 2001
+++ apache_1.3.19/src/modules/standard/mod_rewrite.c Wed May 23 16:39:47 2001
@@ -1604,10 +1604,10 @@
/*
* Ignore this rule on subrequests if we are explicitly
- * asked to do so or this is a proxy-throughput or a
+ * asked to do so or if this is a
* forced redirect rule.
*/
if (r->main != NULL &&
(p->flags & RULEFLAG_IGNOREONSUBREQ ||
- p->flags & RULEFLAG_PROXY ||
+ /* p->flags & RULEFLAG_PROXY || */
p->flags & RULEFLAG_FORCEREDIRECT )) {
continue;