[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: mod_perl And Redirection
From:       Geoffrey Young <geoff () modperlcookbook ! org>
Date:       2003-06-30 19:54:40
[Download RAW message or body]


 > $r->headers_in->unset("Content-length");
 >         $r->header_out(Location => "$uri");
 >         $r->status(REDIRECT);
 >         $r->send_http_header;
 >         return REDIRECT;

well, you shouldn't ever mess with $r->status - that messes up Apache's
internal bookkeeping.  and don't send headers on an error response, which is
what REDIRECT is as far as Apache is concerned.  so, you end up with

$r->header_out(Location => $uri);
return REDIRECT;

HTH

--Geoff


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic