页面重定向到codeigniter中的site_url()。我在路由中设置了路径.php,如果它采用错误的路径,则重定向到 site_url(),它应该在哪里找到页面?为此该怎么办?
在路由中.php我在下面的代码中写道。
$route['default_controller'] = "welcome";
$route['404_override'] = 'pagenotfound';
$route['profile/add_to_favorites'] = "profile/add_to_favorites";
$route['city/(:any)/welcome/venue_display/(:any)'] = "welcome/venue_display";
$route['city'] = "welcome"; `enter code here`
$route['city/(:any)'] = "welcome";
现在,如果我打开了链接 http://mytest.com/city/[任何虚拟数据],它应该重定向到pagenotfound页面。但它穿鞋来自 http://mytest.com/的数据
不,不应该。
mytest.com/city/[任何虚拟数据]与$route['city/(:any)']
匹配。