darren chamberlain wrote:
>
> Greg Cope ([EMAIL PROTECTED]) said something to this effect:
> > > $r->header_out(Location => 'http://' . $r -> server -> server_hostname .
> > > $r->uri());
> >
> > Seems easy - will add it in.
>
> It's not that simple, of course -- you need to maintain port numbers and
> all that. I recommend using Apache::URI -- create a new Apache::URI object,
> set its attributes from the Apache object, and then call unparse on it.
I don't see the complication - this appears to work ok:
my $uri = Apache::URI->parse($r);
# hostinfo give port if necessary - otherwise not
my $hostinfo = $uri->hostinfo;
my $scheme = $uri->scheme . '://';
$redirect = $scheme . $hostinfo . '/'. $session_id . '/' . $rest .
$args;
This should always give the following redirect URI:
http://www.foo.com/456456456456456/orginal_request.hmtl
the scheme and port changing as neccessary.
The only possible issue is if the hostname / scheme containt duff (un
uencoded) chars - which appears illogical to me.
Greg
>
> (darren)
>
> --
> In the fight between you and the world, back the world.