CodeIgniter Forums
Route problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Route problem (/showthread.php?tid=80551)



Route problem - pippuccio76 - 11-15-2021

hi , this is a row of my Route:

$routes->add('admin/', 'Admin::index');

why  if i open this link :
http://localhost:8080/admin/
have i a 404 ?

https://imgur.com/OYFNzJ5.png


RE: Route problem - captain-sensible - 11-15-2021

none of my routes have that trailing forward slash 'admin/' unless :

Code:
$routes->get('productCat/(:segment)','Product::getCategory/$1');


it i guess could also be that if index method of Class Admin calls a view which doesn't exist ?