[prev] [thread] [next] [Date index for 2004/10/31]
Eric Lenio wrote: > In my apache config file I'm using a PerlTransHandler call to do URL rewriting. > Basically I want to map all URL's beginning with > > http://testhost.lenio.net > > to internally to go to: > > http://localhost:8080 > > This works perfectly except when I introduce a URL with a question > mark like this: > > http://testhost.lenio.net?argument1=some_value > > The proxy seems to try to escape the question mark to be %3F, but that's where > I'm getting lost. Thoughts? Here's the actual PerlTransHandler: shouldn't there be a slash after the domain name? http://testhost.lenio.net/?argument1=some_value I wonder if that's a valid URL at all: http://testhost.lenio.net?argument1=some_value > use Apache::RequestRec (); > use Apache::Const -compile => qw(DECLINED :common); > sub handler { > my $r = shift; > my $hostname = $r->hostname; > my $real_url = $r->unparsed_uri; > if ($hostname =~ m{^testhost\.}i) { > $r->proxyreq(1); > $r->uri($real_url); > $r->filename(sprintf "proxy:http://localhost:8080%s",$real_url); > $r->handler('proxy-server'); > return Apache::OK; > } > return Apache::DECLINED; > } > 1; Why don't you just rewrite the URLs with ProxyPass? http://perl.apache.org/docs/1.0/guide/scenario.html#toc_Concepts_and_Configuration_Directives -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
mp2: PerlTransHandler/proxying with question mark in URL Eric Lenio 16:30 on 30 Oct 2004
Re: mp2: PerlTransHandler/proxying with question mark in URL Stas Bekman 00:21 on 31 Oct 2004
Generated at 11:26 on 21 Dec 2004 by mariachi v0.52