$route['(:any)'] = 'reference/check/$1';
I need it because the first parameter in the URL after the domain is the username ( exemplo.com/{nome_usuario}
). Then I check the Reference class.
The problem is that in this case all other Controllers were inaccessible, all of which were overridden by the route rule as I showed above.
As a workaround I had to force the other Controllers by setting routes for them as well,
$route['home'] = 'home';
$route['login'] = 'login';
$route['register'] = 'register';
$route['(:any)'] = 'reference/check/$1';
Is there any alternative that I can use so that I do not have to define new routes whenever I create a new Controller ?