[eluser]davidbehler[/eluser]
What you could do is this:
Define routes for all controllers you have in /config/routes.php, e.g. like this:
Code:
$route['controller_name'] = 'controller_name';
$route['controller_name/(:any)'] = 'controller_name/$1';
$route['controller_name2'] = 'controller_name2';
$route['controller_name2/(:any)'] = 'controller_name2/$1';
Now after you've done this for all your controllers you've made sure that all calls to them actually reach them. Then you add a final route that catches all controllers/url that are not listed above and sends it to a special controller that decides what to do depending on the given url, e.g. checks if the given url is the admin url the user has chosen:
Code:
$route['(:any)'] = 'my_routing_controller/check/$1';
Now in that controller you check the parameter and redirect or what ever depending on the result:
Code:
class My_routing_controller extends CI_Controller {
function __construct()
{
parent::_construct();
}
function check($uri)
{
$this->load->model('Check_model');
$real_controller = $this->Check_model->get_real_controller($uri);
redirect($real_controller);
}
}
This is totally untested, but that's pretty much what I do for projects where users can choose their own url_title for their profile or something.