title: Codeigniter: how to access controllers in ‘admin’ directory
body: <p>I have created an <code>admin</code> folder in <code>controllers</code> folder. I have created a controller <code>user</code> in <code>controllers/admin</code> folder.</p>
  <p>The following line was added to routes.php:</p>
  <pre><code>$route[‘admin/(:any)’] = ‘admin/([a-zA-Z0-9/_]+)’;
  </code></pre>
  <p>The following url is used to access the <code>user</code> controller in <code>controllers/admin</code> folder.</p>
  <pre><code>http://localhost/main/forum/admin/user/
  </code></pre>
  <p>My application is routed to default controller and my urls are containing variable like as follows:</p>
  <pre><code>http://localhost/main/forum/admin/user/view
  http://localhost/main/forum/admin/user/create
  http://localhost/main/forum/admin/user/delete/uid/1/uname/my_name
  http://localhost/main/forum/admin/dashboard/first_var/2/second_var/3/third_var/4
  </code></pre>
  <p>Thanks in advance.</p>
  <p><em>Also posted on the CodeIgniter forums: <a href="http://codeigniter.com/forums/viewthread/181593/" rel="nofollow noreferrer">Code Igniter forum link</a></em></p>