开发者

Codeigniter URI Routing Issue

I have the following URL

domain.com/name/details/12345

开发者_开发知识库I want it so if someone types in

domain.com/name/12345 it goes to the above

I am using $route[‘name/details/(:num)’] = ‘name/’;

But I get a 404 error when I try it.


From looking at the documentation: http://ellislab.com/codeigniter/user_guide/general/routing.html

It looks like what you want is:

$route['name/(:num)'] = 'name/details/$1';

The route name/12345 is matched and routed to name/details/12345

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜