标签: php codeigniter
有没有办法捕获所有网址请求并路由它们?有点像:
$route['everything'] = "controller";
答案 0 :(得分:5)
$route['(:any)'] = "controller";
答案 1 :(得分:2)
$route['(:any)'] = "your_controller/your_method/$1";
这应该有效。这样,(:any)中的内容将作为参数传递给您的方法。
(:any)
答案 2 :(得分:1)
试试这个 -
$route[':any'] = 'path of the default controller';
你可以获得它的文档here