2015-07-01 20:58

Codeigniter 3路由问题


I have setup a route in the routes.php file like this:

$route['videos/video'] = 'videos';

So if a user enters:

I want it to just load the videos page which works, but the issue I am running into is that it is keeping the URL the same so when the user clicks on one of the videos from the videos page the url will look like this:

When is should look like this:

Is there any way to change this behavior?

Also, is there any way to hide the method in the URL?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • dongyanhu5628 dongyanhu5628 6年前
    $route['videos/video'] = "videos/index";
    $route['videos/video/(:num)'] = "videos/video/$1";
    点赞 评论 复制链接分享