>From my point redirect is always bad in case of not found record.
Without 404 status no engine will know that URL is invalid. I
personally did redirects with 404 status on one project, but never
thought is it valid from HTTP perspective or not. Hope that
customization of NotFoundException allows to do anything - as 404 page
output as custom redirect.

On 18 окт, 18:29, euromark <[email protected]> wrote:
> the last years with cake <= 1.3 everybody simply redirected if a
> record didnt exist
>
> if (!$post) {
>     //flash message (error)
>     $this->redirect(...) // to previous url or default index etc
>
> }
>
> the 2.0 book proposes:
>
> if (!$post) {
>         throw new NotFoundException();
>
> }
>
> so are redirects "outdated"? should actions throw such exceptions if
> only the id is wrong (deleted, wrong access, ...)?
> does it hurt the usability to do so?
>
> of course you could still use the former approach. just wondering what
> the cons and pros are here.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to