I have a CI setup where a URL may invoke a specific controller OR should be forwarded to a catch-all controller where no such controller exists. Sort of like default
in a switch statement. Examples:
domain/real-controller //<-- handled by controllers/Real-controller.php
domain/another-real-controller //<-- controllers/Another-real-controller.php
domain/foobar //<-- no such controller; forwarded to a catch-all
I'm aware of rerouting, but I can't do
$route['(:any)'] = 'catchall_controller'
as this will (presumably) block reqeusts to legitimate controllers.
I could presumably do something hacky with 404 handling, but I wondered if there was a better way. Anyone know one?