title: Codeigniter making sub-directory controllers work
body: <p>I'm having trouble making the page load the controller I want it too.</p>
  
  <p>For example I want my site to load as localhost/sitename/catergory1/catergory2 where catergory 1 is its own controller and 2 is a method. So i've tried adding this to my routes.php:</p>
  
  <pre><code>$route['catergory1'] = 'catergory1/cat1';
  </code></pre>
  
  <p>with my controller file set up as:<br>
  <code>-Controller</code><br>
      &nbsp;&nbsp;&nbsp;<code>-Home.php</code><br>
  &nbsp;&nbsp;&nbsp;<code>-catergory1</code>  &lt;- subfolder<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>-cat1.php</code><br>
  which I thought would cause codeigniter to load the controller 'cat1' inside the catergory 1 folder but instead when I go to localhost/sitename/catergory1 it just loads my default controller 'home'. I've tried putting it in both the uri routes and reserved routes part of routes.php but it still won't work. It's probably something really easy but im new to this.  </p>
  
  <p>Heres the controllers themselves just incase its something to do with them:<br>
  home controller:  </p>
  
  <pre><code>class Home extends CI_Controller {  
      function index() {  
          $this-&gt;load-&gt;view('home');  
      }
  }
  </code></pre>
  
  <p>Cat1 controller:  </p>
  
  <pre><code>class Cat1 extends CI_Controller{  
      function index() {  
          $this-&gt;load-&gt;view('cat1');  
      }  
  }
  </code></pre>
  
  <p>Am i just being stupid and missing something easy?<br>
  Thanks.</p>