if you redirect with a 301 to the index page it should be "more
correct"
but that probably doesnt work for all occasions

I do see your point of valid or not
although I still like the idea of the redirect as the user is less
annoyed
(sometimes the article is not yet approved or whatever and actually
exists
so a redirect with a proper message is sometimes more helpful as a
simple 404)



On 19 Okt., 06:06, "Dr. Loboto" <[email protected]> wrote:
> 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