title: CodeIgniter Custom Admin URI Routes
body: <p>UPDATE: SOLVED! For the broken pages I simply made an admin controller. That has a function for each model now :) Happy days!</p>
  
  <p>Trying to house my admin function in the same controller as my front-end code. To do this I am setting up some custom routes so that admin can be accessed via:</p>
  
  <pre><code>/admin/controller/id // instead of /controller/admin/id
  /admin/controller/create // instead of /controller/create
  /admin/controller/detail/id // instead of /controller/detail/id
  /admin/controller/update/id // instead of /controller/update/id
  /admin/controller/delete/id // instead of /controller/delete/id
  </code></pre>
  
  <p>My current routes work perfectly for detail, create, update, delete</p>
  
  <pre><code>$route['admin/(:any)/detail'] = "$1/detail"; // WORKS!!!
  $route['admin/(:any)/detail/(:num)'] = "$1/detail/$2"; // WORKS!!!
  $route['admin/(:any)/create'] = "$1/create"; // WORKS!!!
  $route['admin/(:any)/create/(:num)'] = "$1/create/$2"; // WORKS!!!
  $route['admin/(:any)/update'] = "$1/update"; // WORKS!!!
  $route['admin/(:any)/update/(:num)'] = "$1/update/$2"; // WORKS!!!
  $route['admin/(:any)/delete'] = "$1/delete"; // WORKS!!!
  $route['admin/(:any)/delete/(:num)'] = "$1/delete/$2"; // WORKS!!!
  </code></pre>
  
  <p>HOWEVER I cannot get the admin page to work with an ID. I can reroute the index page, but will be unable to use pagination if I cannot pass the ID.</p>
  
  <pre><code>$route['admin/(:any)'] = "$1/admin"; // WORKS!!!
  $route['admin/(:any)/(:num)'] = "$1/admin/$2"; // EPIC FAIL :( 404's
  </code></pre>
  
  <p>Can someone please help me solve this problem, or even suggest an alternative solution of application structure.</p>