Kristian Nilssen wrote: > Thanks for your reply, I made a redirect component which looks like this... > <%init> > $r->status(302); > $m->redirect($url); > </%init> > > <%args> > $url # URL to redirect to > </%args> > > but it produces the same 200 ok problem. I must be missing something? > > rgds, > Kristian.
That's curious, I would expect that to work. I've implemented redirect as a library function, as opposed to a component, and I'm writing the headers myself, as opposed to using $m->redirect. Here is the code I use: $m->auto_send_headers(0); $r->headers_out->add('Location' => $url); $r->status($status); $m->clear_buffer; ## include status here anyway, just in case it's started ## working again $m->abort($status); I don't know if you'd have any more luck with that? You might also want to play around with $url a bit if using this method, IIRC you're not supposed to have relative URLs in the Location header. I use a combination of $r->uri and $r->construct_url to play with $url. -Oli
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users