Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Codeigniter Coginter清除Url_Codeigniter - Fatal编程技术网

Codeigniter Coginter清除Url

Codeigniter Coginter清除Url,codeigniter,Codeigniter,我用的是Coginter 我想清理url 我有网址 我想要这个网址 在路由文件中我编写代码 $route['categories/(:any)'] = "$1"; 但这是行不通的 有人知道吗 谢谢给你 当前: 期望的: 然后在application/config/routes.php上 添加此路由规则 //如果class=newarticle,method=categories,3rd seg=get_categories,4th(:any)通配符 $route['newarticle/cat

我用的是Coginter

我想清理url

我有网址

我想要这个网址

在路由文件中我编写代码

$route['categories/(:any)'] = "$1";
但这是行不通的

有人知道吗

谢谢

给你

当前:

期望的:

然后在application/config/routes.php上 添加此路由规则

//如果class=newarticle,method=categories,3rd seg=get_categories,4th(:any)通配符 $route['newarticle/categories/get_categories/:any']=“newarticle/electronics”

包含段newaricle/categories/get_categories的URL将重新映射到类newarticle和method electronics