Routing all URL requests in CodeIgniter?
Is there a way to capture all URL requests and route them? Sort of like:
开发者_开发知识库$route['everything'] = "controller";
$route['(:any)'] = "controller";
$route['(:any)'] = "your_controller/your_method/$1";
This should work. This way, what is in (:any)
will be passed to your method as a parameter.
Try this -
$route[':any'] = 'path of the default controller';
you can get it's documentation here
精彩评论