[eluser]Bramme[/eluser]
Hey all,
I'm still working on porting a website I made to CI. I've finished up most of the front end, which is entirely based on one controller: page. I use routing to cut off the page/ part and just directly route to the function like this.
Code:
$route['(:any)'] = "page/$1";
But now I'm starting on the backend and it seemed only right to me to create a new controller for it. So I made a new controller, Admin. I thought I could set up routes like this:
Code:
$rout['admin'] = 'admin';
$route['(:any)'] = "page/$1";
and I'd be good to go, but that's clearly not the case, as I'm getting a CI 404.
Code:
$rout['admin/(:any)'] = 'admin/$1';
$route['site/(:any)'] = "page/$1";
This works, but it's not exactly what I want... Any way to make the site/ part go away?
Any help?