Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Default 404 routing
  • Hi, this is not a urgent, but should-know matter for me.

    Routing 404 error is set in APPPATH/config/routes.php as follows.
    >>
    <?php
    return array(
    '_root_'  => 'auth/index',  // The default route
    '_404_'   => 'index/404',    // The main 404 route
    );
    <<

    What if the '_404_' is misconfigured like there is no APPPATH/classes/controller/index.php?
    I tried it and I got another 404 error page which I like :)
    It would be great if you tell me how it works.

    Thank you in advance.


  • HarroHarro
    Accepted Answer
    Then you'll get the frameworks internal 404 page, which is created by fuel/core/views/404.php.

    It is generated because HttpNotFoundException is thrown, and that class has a response method that loads and returns that view. HttpServerErrorException works the same for a 500 error.
  • Thanks for quick response. I understood it.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion