I want to create one 404 custom page for all errors coming to the website for the workbench. For example, if I get a missing controller or a viewing error, it will be redirected to.
http://example.com/404.html,Also, in some cases, I intentionally redirect ithttp://example.com/404.html
Earlier in CakePHP 2.x this was done by adding the following action in AppContoller.php
public function appError($error) {
$this->redirect('/page-not-found.html',301,false);
}
But it does not work in CakePHP 3.x, I want to reproduce the same behavior in CakePHP 3.x
source
share