Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Suggestion: do not redirect to /error, but just show a nice 404 error page on the current URL #13

@JelmerD

Description

@JelmerD

You don't want to redirect to another URL if you expect a 404. There is no 404 response code and it's not very common to redirect.

Normal behavior: just show a 404 page on the current URL.

My suggestion:

Change https://github.com/panique/mini3/blob/master/application/Core/Application.php#L55 and https://github.com/panique/mini3/blob/master/application/Core/Application.php#L59 to:

$this->url_controller = new \Mini\Controller\ErrorController();
$this->url_controller->notFound();

And change https://github.com/panique/mini3/blob/master/application/Controller/ErrorController.php#L20 to notFound.

Then I will be able to set a customised error page for a 404. Direct access to /error should be blocked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions