Reputation: 7416
New to Kohana... I was wondering if it's possible to use regex for setting up a route that handles all requests except for one, 'main_page' for example?
Thanks for your time
Upvotes: 1
Views: 427
Reputation: 16015
you dont need a regex to do that. its like you would do it in the .htaccess
Route::set('main_page', 'main_page(/<action>(/<id>))')
->defaults(array(
'controller' => 'main_page',
'action' => 'some_action',
));
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'welcome',
));
Upvotes: 6