Codeigniter: Set Default Controller

Navigate to application/config/routes.php

you will find a line like

$route['default_controller'] = 'welcome';

set your controller name whatever you want like:

$route['default_controller'] = 'nameofyourcontroller';

working-on-a-computer-smiley-emoticon

Codeigniter: Removing the index.php file from url

By default, the index.php file will be included in your URLs:

First Enable Your Apache server rewrite_module enable,

And Create a .htacces file in your root folder with the following code:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

working-on-a-computer-smiley-emoticon