If you are using Apache place a .htaccess file in your root web directory containing the following:
RewriteEngine On
RewriteBase /code_work/
RewriteRule ^code_work/?$ index.php/admin/ [L]
RewriteRule ^code_work/([^.]+)/?$ index.php/admin/$1 [L]
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [L]
for admin penal:-
in rout.php
$route[‘admin’]=”admin/home”;
$route[“admin/(:any)”]=”admin/$1″;