http://localhost/project address is my base url
My index uses the controller file at this address. controller->Index.php
I will prepare an admin panel and I want to access the admin panel as follows: http://localhost/project/admin
I want to folder the controller files of the admin panel separately. In that: controller/admin/Index.php
I have set a route like this: $ route ['admin'] = 'admin/Index';
But when I go to http://localhost/project/admin, I get 404 error.
I could not understand where I made a mistake. Thanks for your help.
$route['admin'] = 'admin/admin';and folder structure of Controllers/admin/Admin.php - Sayd Fuadfunction index() {}in your Admin.php controller? and also check .htaccess maybe your base URL not setup correctly. check .htaccess format here codeigniter.com/userguide3/general/urls.html?highlight=url - Sayd Fuad