简体   繁体   English

正则表达式Codeigniter中的路由问题

[英]Routing issues in regex codeigniter

Problem is i have two routes 问题是我有两条路线

$route['management/(:any)'] = 'mycontroller/home/$1'; $ route ['management /(:any)'] ='mycontroller / home / $ 1'; $route['management/(:any)/contact'] = 'mycontroller/contact/$1'; $ route ['management /(:any)/ contact'] ='mycontroller / contact / $ 1';

First route is working properly but second is not working. 第一条路线工作正常,但第二条路线却无效。 can any one please guide me i am using codeigniter framework. 谁能指导我,我正在使用Codeigniter框架。

Try switching the order in which you write them. 尝试切换书写顺序。 The first one is probably catching that route, so it's never making it to the second one. 第一个可能正在追赶这条路,因此它从未进入第二个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM