I have a ZF application. In my bootstrap.php I defined the routes for my application. Now, when I type an URL in the address bar that does not match any of the routes, I get a fatal error. I don't want that, I just want to show a 'page can not be found' error. How come the application throws a fatal error, instead of going to my error controller?
This is what my routes look like:
$router->addRoute('page1',
new Zend_Controller_Router_Route_Static('page1', array(
'controller' => 'mycontroller',
'action' => 'index',
'id' => '2626'
))
);
For example, if I browse to /page2 I get a fatal error, because it goes to 'mycontroller' anyway, and tries to do stuff I do in that controller. But I don't want it to go there.
Thanks in advance for your replies.