throw new Zend_Controller_Action_Exception('Page not found', 404);

This is what I do

-----Oorspronkelijk bericht----- From: Serkan Temizel
Sent: Wednesday, February 09, 2011 5:14 PM
To: zend FW - General
Subject: [fw-general] How to handle 404

Hi,

URL: domain.com/page/show/id/1

as you guess page controller, show action displays the page with id 1.
Everything is OK

In the controller I make a check for id

public function showAction() {
$request = $this->getRequest ();
if(!is_numeric($request->id)){

  //no id no page! but what to do now?

 }
}


if no page id or it is not a number what is the best way to handle this

_forward('error404','error')  ???
_redirect ('error/error404')  ???
or any other approach ???


Serkan

Reply via email to