Content is king.
If the content is relevant, then keep it.
Rather than deleting content form your site, deprecate it, and post a
nice little message at the top to indicate to real people that the
content may be out of date or no longer relevant.
This will allow Google to index and list your site, as well as offer
information for people that may have bookmarked the page in question.

Of course a simple "This content requested no longer exists" message
could work too, but you dont get indexed for the content that used to
be there.
This can be done by checking the existance of an ID, and if that ID
doesnt exist, or you cannot load the data, redirect the user to a page
like /myapp/contentExpired

Hope this helps.

Cheers,
Predom

On Sep 19, 2:51 pm, MikeK <[EMAIL PROTECTED]> wrote:
> I suspect I am making google very angry. I have a general content
> management application.
>
> In my actions I validate all the input to make sure all is cpoacetic.
> However what is the 'proper' action I should take when ggogle for
> example comes along and requests a page that has been deleted?
>
> For examplewww.mysite.com/myapp/action/view/134might be fine and
> dandy on Monday, but on Wednesday the user deletes something and now
> record 134 no longer exists.
>
> I detect in the view action (for example) that the requested id is no
> longer around but what should I throw up there for the entity that
> requested the web page?
>
> Right now I do the following when I detect these requests for deleted
> data pages:
>
> $this->cakeError('error404',array(array('url'=> 'http://' .
> MY_SERVER_NAME . $_SERVER['REDIRECT_URL'])));
> $this->Session->setFlash($this->action . ': Invalid  ID.');
> $this->redirect(array('action'=>'index'), null, true);  // GO TO A
> KNOWN GOOD PAGE
>
> Is there a better approach?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to