getRouter(); // Define your routes here $router->handle($_SERVER['REQUEST_URI']); $router->add('/',[ 'controller' => 'index', 'action' => 'index', ]); $router->add('/:controller/:action/:params',[ 'controller' => 1, 'action' => 2, 'params' => 3 ]); $router->add('/:controller',[ 'controller' => 1, 'action' => 'index' ]); $router->add('/gogs/:params',[ 'controller'=>'gogs', 'action'=>'index', 'params'=>1 ]); $router->notFound([ 'controller' => 'index', 'action' => 'show404', ]);