Welcome Guest, Not a member yet? Register   Sign In
Removing Controller Name

I've watching screencast, and i very curious of how to removing controller from url.

I've tried this on rout

$route['default_controller'] = "main";
$route['scaffolding_trigger'] = "";

$routearr = array ('main','company','users');
foreach ($routearr as $v ) {
    $route[$v] = $v;    
    $route[$v.'/(.*)'] = $v."/$1";    
$route['/(.*)'] = "main/index/$1";

But it doesnt work, because i always get 404 error

Did you create a .htaccess file and add the following:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Check out:

Theme © iAndrew 2016 - Forum software by © MyBB