[eluser]phazei[/eluser]
Right now I have my default controller: main
If someone goes to domain.com it automatically goes to main/index
But if someone goes to domain.com/about, and about is in the main controller,
it needs to be rerouted.
Right now I'm rerouting all my main/methods to main:
Code:
$uri_short_list = array('home','profile','account','about','faq','contact');
foreach ($uri_short_list as $uri_short) {
$route[$uri_short] = 'main/'.$uri_short;
}
Is there a way to use regex to route all domain.com/$1 to domain.com/main/$2
But here's the caveat: only if that method doesn't exist as a controller somewhere else.
Eg: If I have a controller: 'account', then if someone goes to domain.com/account, it won't get directed to main/account, but will go to the account controller.
Thanks.