$route['segment1/(:any)/(:any)'] = "myController/$1/$2";
在这种情况下,我将不得不链接 segment1/someMethod/someParam,但是如果我在 url 中没有参数怎么办,我需要这样写:
$route['segment1/(:any)'] = "myController/$1";
$route['segment1/(:any)/(:any)'] = "myController/$1/$2";
因此这两种情况现在都可以工作,所以问题是:我可以一次编写这两行代码吗?