> -----Original Message-----
> From: B. Burke [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 13, 2000 10:44 AM
> To: [EMAIL PROTECTED]
> Subject: help with custom Error documents/redirection
>
>
> I'm looking to implement custom error handling, and I'm
> hitting a snag.
> I'm hoping to do something like on pg.168 of the Eagle book, where you
> have a handler and user $r->prev to get the original request.
>
> I'm wanting to redirect to 1 of 2 pages, depending on what the
> requested page was. I plan on using $r->custom_response to do the
> redirection (as shown on pg. 170 of the Eagle bk).
>
> The problem I'm having is that $r->prev doesn't seem to be getting
> the request. I setup a <Location> for the handler, and setup an
> ErrorDocument to point to the Location. It works, except that I can't
> seem to get $r->prev to tell me what the request was.
you know that $r->prev returns a request object, and not anthing specific
(like the previous location), right? :)
if you're still unable to get it working, try pointing custom_response to a
script that gleans $r->prev->uri and returns the proper response based on
that... the whole error document cycle is hard to get until you get it.
keep playing and you'll see the light eventually :)
BTW, it's always good (at least I've found) to call
my $prev_uri = $r->prev ? $r->prev->uri : $r->uri;
because if the page/script is accessed directly then $r->prev is undefined
and you get a runtime error.
HTH
--Geoff
>
> Any help will be greatly appreciated.
>
> Thanks,
> Brian B.
>