[eluser]BrianDHall[/eluser]
[quote author="russback" date="1258773471"]Just noticed a problem with this.
'manage' shouldn't resolve to 'page' but 'management' should. But this doesn't achieve this - 'management' attempts to load a 'manangement' controller.
Any thoughts?
Thanks again[/quote]
Tricky!
You'll need a little bit more fancy of a route then:
Code:
route['default_controller'] = "defaultcontroller";
// Route everything but mentioned controllers to default controller, allowing short urls to work.
$route['^(?!manage[^\w]).*'] = $route['default_controller'] . "/$0";
This way it will select anything with 'manage' in the string - but that is NOT followed by a word character. So manage will match, but management won't.
You'll want to test 'testmanage' to see if that matches. If it does, you'll need the even more specific route:
Code:
$route['^(?![^\w]manage[^\w]).*'] = $route['default_controller'] . "/$0";
Annoyingly specific, but it should work