Welcome Guest, Not a member yet? Register   Sign In
Customizable 404 Error Pages for Specific Routes
#9

(This post was last modified: 08-23-2024, 02:48 AM by ozornick.)

You can extend the Error Handler and split HTTP errors into a handler in the controller.
As schematically (soorry, with phone):

PHP Code:
if ($exception->getCode() >= 400 && $controller->overWrite404) {
    return  $controller->overWrite404();


if you need to process any response in 404, this is the work of Filters. Recognize the response and also replace the error
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply


Messages In This Thread
RE: Customizable 404 Error Pages for Specific Routes - by ozornick - 08-23-2024, 02:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB