Error: A route matching "/" could not be found


#1

Hello Everyone, I am an iOS Developer who is trying to load the page in /admin/login. I keep getting this error:

.

I’m running the site locally with MAMP Pro on port 8888. I am just trying to get {host}/admin/login to load. The github link is https://github.com/angelfretz23/livingwords412-cakephp if you would like to check it out.

Looking forward to hearing from you.


#2

it happen because you not define or connecting the root ‘/’ to any controller.

here’s the example of default route from cakePhp :

$routes->connect(’/’, [‘controller’ => ‘Pages’, ‘action’ => ‘display’, ‘home’]);

this route required for root/default route