如果我有一个CMS并创建一个名为" Name"但我也有一个名为" Name"
的控制器有没有办法可以让它成为名为" Name"不会覆盖控制器
我尝试了以下路线但似乎是CMS数据库页面"名称"仍然覆盖
路线:
$route['name'] = "name";
$route['name/details/(:num)/(:num)'] = "screenings/details/$1/$2";
答案 0 :(得分:0)
您只需要添加:
$route['name'] = "name";
之后:
$route['name/details/(:num)/(:num)'] = "screenings/details/$1/$2";
所以在你的情况下它将是:
$route['name/details/(:num)/(:num)'] = "screenings/details/$1/$2";
$route['name'] = "name/index"; //It is better to add the /index just to make sure
据我记得在Codeigniter中,路由优先级是您首先添加的。