Remove Controller from the URI to keep URL Shorter


I want to keep the url's short and have this: / function / ID

so that by default my controller called Main will accept the functions.

My question is:
How can I do this so that I do not have to re-edit the routes.php file when I add another controller?
e.g. in three months time I decide to add an Admin controller

To add
I have my Main controller accepting the functions currently. I'm doing the following which I found here

$route['^(?!exemptdomians|ezsell|login).*'] = "main/$0";

But this means I have to re-edit this in routes.php whenever I add a controller.

many thanks if you can give any help!

You can either add the routes automatically:

Or you can extend the Router class and add that functionality there:

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.