Just trying to sort out the routing for the admin panel I need to make up, I’m using Matchbox and the latest version of CI.
I have several modules:
samples
events
gallery
projects
etc etc.
Following the guide at: http://philsturgeon.co.uk/news/2009/07/Create-an-Admin-panel-with-CodeIgniter I was trying to go for option 3 and use the route:
$route[‘admin/(:any)’] = ‘$1/admin’; but for some reason it just keeps throwing back 404 on the first part of the path. So for instance:
admin/samples was throwing 404 Page Not Found—> samples
Whereas if i go into my browser and bring up my base path /samples it works fine.
my routes file (Application/Config) is as follows:
$route['default_controller'] = "welcome";
$route['scaffolding_trigger'] = "";
$route['about'] = "welcome/aboutPage";
$route['photos'] = "welcome/galleryPage";
$route['contact'] = "welcome/contactPage";
$route['admin/login'] = 'admin/login';
$route['admin/logout'] = 'admin/logout';
$route['admin/(:any)'] = '$1/admin';
$route['admin'] = 'admin';
I’ve noticed that this routes file actually can’t find any of my modules even if they are manually typed in like:
$route[‘test’] = ‘samples’; is that normal?
Hope someone can help!
Cheers.
