CodeIgniter default controller in a sub directory not working

前端 未结 9 1684
醉话见心
醉话见心 2020-11-29 10:15

My default_controller in the routes configuration is set as \"home.php\".

I have a sub directory for my controllers, lets call it \"folder\". So if I visit http://my

9条回答
  •  悲&欢浪女
    2020-11-29 11:07

    If you want to stay flexible you need to pass on everything after the starting folder (in application/config/config.php):

    $route['home'] = "home/whatever";
    $route['home/(:any)'] = "home/whatever/$1";
    

提交回复
热议问题