> -----Original Message-----
> From: darren chamberlain [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 06, 2000 4:41 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Adding parameters on an internal_redirect()
>
>
> [EMAIL PROTECTED] ([EMAIL PROTECTED]) said something to this effect:
> > What I'd like to do with a particular type of error is
> redirect with all the
> > parameters passed to the error-inducing script plus one
> tacked on for good
> > measure.
> >
> > So if /blah/foo.pl?bar=1 was the script that generates the
> error, something
> > like
> > $r->internal_redirect( /error/error.pl?type=4 ) would hopefully pass
> > error.pl both the 'bar' and 'type' params. As it stands
> now, I can get the
> > 'bar' param, but have had no luck getting the 'type' param added on.
no need for all of the pnotes stuff...
in error.pl use
my %orig = $r->prev->args if $r->prev;
my %error = $r->args;
which should work fine if foo.pl does an internal redirect or uses
ErrorDocument...
HTH
--Geoff
>
> what about something like
>
> my $error = "/error/error.pl?type=4";
> my %args = $r->args;
> my $uri = join '&', $error, map { "$_=$args{$_}" } keys %args;
>
> $r->internal_redirect($uri);
>
> ?
>
> Alternatively, how about taking a different approach:
>
> $r->pnotes('Original-Uri-QueryString' => $r->args);
> $r->internal_redirect('/error/error.pl?type=4');
>
> And then in /error/error.pl, look for
> 'Original-Uri-QueryString' in the
> pnotes table. Hint:
>
> # In /error/error.pl:
> my $orig_args = $r->pnotes('Original-Uri-QueryString');
>
> (darren)
>
> --
> There are two ways to write error-free programs. Only the
> third one works.
>