开发者

Routing all URL requests in CodeIgniter?

Is there a way to capture all URL requests and route them? Sort of like:

开发者_开发知识库
$route['everything'] = "controller";


$route['(:any)'] = "controller";


$route['(:any)'] = "your_controller/your_method/$1";

This should work. This way, what is in (:any) will be passed to your method as a parameter.


Try this -

$route[':any'] = 'path of the default controller';

you can get it's documentation here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜