Eric Lenio wrote:
> On Thu, Oct 20, 2005 at 10:47:02PM -0400, Philip M. Gollucci wrote:
>
>>Eric Lenio wrote:
>>
>>>The handler converts the question mark to %3f and the proxy request
>>>basically
>>>fails. I'm using modperl 1.99.11, I'd like to fix this before moving in to
>>>2.0.2. Suggestions?
>>
>>Post the relevant configs please.
>
>
> Here are the key parts of the code. Anything else Philip?
>
> package LenioApache::RewriteURI;
>
> use strict;
> use warnings;
>
> use Apache::RequestRec ();
>
> use Apache::Const -compile => qw(DECLINED :common);
>
> sub handler {
> my $r = shift;
> my $hostname = $r->hostname;
> my $port = $r->get_server_port;
> my $real_url = $r->unparsed_uri;
my $real_url = $r->uri;
There is no need to put query arguments in the url, mod_proxy will
pick it up from $r itself.
> if ($hostname =~ m{^hplg2\.}i) {
> $r->proxyreq(1);
> $r->uri($real_url);
> $r->filename(sprintf "proxy:http://192.168.0.4:8080%s",$real_url);
> $r->handler('proxy-server');
> return Apache::OK;
> }
> return Apache::DECLINED;
> }
> 1;
>
--
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature
