Welcome Guest, Not a member yet? Register   Sign In
Custom Routing in CodeIgniter
#1

I am developing eCommerce site in CodeIgniter. I am facing problem in opening the pages of Admin. I have set the default_controller for the main site. Now you how can I open the pages of Admin. I want that when I type http://localhost/ecom/admin then it will open like this http://localhost/ecom/account/login. I have used custom routing in route.php file like this
$route['account/login'] = 'admin/login_controllers'; 
$route['account/dashboard'] = 'admin/dashboard';
login_controllers and dashboard are controllers inside the Admin folder and  in both cases 'index' is the method
When I try to open http://localhost/ecom/admin then it shows 404 Page Not Found. Try to solve my problem.
Reply
#2

What happens is that you are trying to open this URL http://localhost/ecom/admin
but I don't see it configured on your route:

$route['account/login'] = 'admin/login_controllers';
$route['account/dashboard'] = 'admin/dashboard';
Reply




Theme © iAndrew 2016 - Forum software by © MyBB