In 1.1 you were required to call exit() after your redirect. This was
not a problem, but looking at the API for 1.2 - you can specify the
exit call within the function:

function redirect($url, $status = null, $exit = false)

I also like that you can specify a status code as well. However, I
have a question about how it works with the status code. For instance,
I have my controller calling:

$this->redirect('http://www.domain.com','301',true);

Now, I would assume that this would redirect to the domain with a 301
moved permanently (and call exit itself). However, when I telnet the
URL that calls the redirect, my 301 status code is nowhere to be
found. I get:

HTTP/1.1 302 Found
Date: Fri, 16 Feb 2007 20:53:34 GMT
Server: Apache
Set-Cookie: BPI=2f639fea6334d665798f12a336b1f9cd; path=/
P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Location: http://www.domain.com
Content-Type: text/html; charset=utf-8

It shows 302 as the code - is there something I am missing to get this
to work properly?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to