add('basecontroller(:any)', function () { throw PageNotFoundException::forPageNotFound(); }); // Migrations $routes->cli('migrations/(:segment)/(:segment)', '\CodeIgniter\Commands\MigrationsCommand::$1/$2'); $routes->cli('migrations/(:segment)', '\CodeIgniter\Commands\MigrationsCommand::$1'); $routes->cli('migrations', '\CodeIgniter\Commands\MigrationsCommand::index'); // CLI Catchall - uses a _remap to call Commands $routes->cli('ci(:any)', '\CodeIgniter\CLI\CommandRunner::index/$1'); // Prevent access to initController method $routes->add('(:any)/initController', function () { throw PageNotFoundException::forPageNotFound(); });