We want to redirect the user to the shop
controller rather than the default CodeIgniter welcome
controller. We will need to amend the default controller setting in the routes.php
file to reflect this:
Open the
config/routes.php
file for editing and find the following lines (near the bottom of the file):$route['default_controller'] = "welcome"; $route['404_override'] = '';
Firstly, we need to change the default controller. Initially in a CodeIgniter application, the default controller is set to
welcome
; however, we don't need that. Instead, we want the default controller to beshop
. So, find the following line:$route['default_controller'] = "welcome";
Change it to the following:
$route['default_controller'] = "shop"; $route['404_override'] = '';