php - Zend throw 404 headers in development mode -
so i'm working on application , ajax calls controller, , in case of no data throws 404.
throw new zend_controller_action_exception('this page not exist', 404);
the problem have $this->frontcontroller->throwexceptions(true);
in development mode throws error, doesn't set 404 header, , need header because in ajax call based on header know what's next.
is there way throw 404 header in dev mode throwexceptions
set true
?
you should use errorhandler plugin , register errorcontroller indicate 404 page, described here: