I forget to tell. open your config file: application/config/config.php and change this line
$config['index_page'] = “index.php”
To
$config['index_page'] = “”
Create a .htaccess file in the root of your app so
- system
- application
- assets
- .htaccess
To delete the index.php from your url use this .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^LoginTut.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond $1 !^(index\.php|images|table-images|js|robots\.txt|css|captcha)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
It's not a very good idea to hide the controller name because you will get a lot of problems when routing and linking to other functions.
Hope it helps!