Codeigniter Routes Controller Sub Folder

前端 未结 1 1130
春和景丽
春和景丽 2020-12-21 08:20

I\'ve a problem with routes and controller. I\'ve got 2 types of controller: first type is used to manage the webpages, second type is used for cms and I prefer to put them

相关标签:
1条回答
  • 2020-12-21 08:41

    Put the admin route before the any route:

    $route['admin/(:any)'] = "admin/$1";
    $route['(:any)'] = "site/$1";
    

    otherwise it will always hit any and redirect to site. You have to give it a chance to match admin before matching any.

    0 讨论(0)
提交回复
热议问题