【发布时间】:2014-04-21 10:34:15
【问题描述】:
我想在路由时维护一个复杂的 URL 结构。我无法为以下要求编写路由。
如果URL带有http://localhost/api/cals/func/id我想将它路由到http://localhost/api/cals/func/id,否则我想将URL路由到http://localhost/home/。
我试过了,但它并不是在所有用例中都有效。
$route['api/(:any)'] = 'api/(:any)';
$route['(:any)'] = 'home/index/';
为什么会这样?
【问题讨论】:
标签: php angularjs codeigniter routing