You shouldn't be sending a 404 status if you're redirecting. Doing so is confusing because it becomes impossible to know if the the file not found was the original requested or the target of the redirect. Maybe you want a 301? Have a look here:
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection On Tue, Jun 23, 2009 at 3:40 PM, Jamie<[email protected]> wrote: > > OK, so I'm trying to do a simple redirect in a controller with a 404 > error code. The call looks like this (within a method in my > PagesController class): > > $this->redirect('/not-found', 404); > > The redirect works, but the HTTP header status is 200, not 404 > (according to a 'LiveHTTPHeaders' plugin for Firefox). Am I doing > something wrong? Or is this a bug? Or maybe a faulty plugin? Anyone > else use the redirect status option with success? > > - Jamie > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
