xsanisty / SlimBoard

Starter Application built on Slim Framework in MVC (and HMVC) environment
http://www.xsanisty.com/project/slim-starter
MIT License
287 stars 71 forks source link

How to handle page not found issue #13

Closed parthkdas closed 9 years ago

parthkdas commented 9 years ago

I want to handle the requests for which routing rules are not set and giving page not found message. Instead I want to display custom page not found page or redirect to some other page.

ikhsan017 commented 9 years ago

Hi @parthkdas You can try to put this in the beginning of the routes.php file

App::notFound(function(){
    View::display('404.twig');
});
parthkdas commented 9 years ago

Thnx . Its working