HMVC - set default route - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: HMVC - set default route (/showthread.php?tid=63395) |
HMVC - set default route - Lykos22 - 10-26-2015 Hi, I'd like some help please. I'm using CI v.3.0.2 and I have set up HMVC modularity from wiredesignz, so my folder structure look like this Code: - application I have aslo set the routes for my "admin" pages like this, which works great PHP Code: $route['admin/([a-zA-Z_-]+)/(:any)'] = '$1/admin/$2'; I want to set up as default route the Post.php for the front end, so when I tried: PHP Code: $route['default_controller'] = 'post'; I get a 404 error. Could you tell me what I'm doing wrong and how to fix this ? RE: HMVC - set default route - davicotico - 10-26-2015 (10-26-2015, 04:37 AM)Lykos22 Wrote: Hi, I'd like some help please. I'm using CI v.3.0.2 and I have set up HMVC modularity from wiredesignz, so my folder structure look like this In that source structure, you have a folder "posts" (plural), and a controller "Post.php" (singular) RE: HMVC - set default route - Lykos22 - 10-26-2015 (10-26-2015, 04:43 AM)davicotico Wrote: In that source structure, you have a folder "posts" (plural), and a controller "Post.php" (singular) You mean it should be set as PHP Code: $route['default_controller'] = 'posts'; RE: HMVC - set default route - davicotico - 10-26-2015 (10-26-2015, 05:10 AM)Lykos22 Wrote:(10-26-2015, 04:43 AM)davicotico Wrote: In that source structure, you have a folder "posts" (plural), and a controller "Post.php" (singular) I meant that the Controller folder name should be the same as the main controller file name. -modules - - post/ - - - - controllers/ - - - - - - Post.php - - - - - - Admin.php |