I wrote a controller named Admin with method index
and placed as /application/controllers/admin.php
for URL http://localhost/admin
.
Then I wrote another controller named Account inside /application/controllers/admin/
folder, with a method login
for URL http://localhost/admin/account/login
.
But the problem is when I visit /admin/account/login
I got a 404. I don't know why? Or how can I define this 2 path in my controllers?
I also faced the same problem but for only solution was to either rename the subfolder name or rename the outside controller name.