It github, for example, there is path for ajax only requests - login/email checking. And when you try open this uri in browser (non-ajax request) you get 404 page, the same page as for nonexistent uri. How to do this right and gracefully in Phalcon? For example I can use
<? $this->response->setStatusCode(404, "Not Found"); $this->dispatcher->forward(array( 'controller' => 'error', 'action' => '_404', )); return;
but it is not pretty, because if I want to change action I have to change it in many places where I do 404.