title: CodeIgniter disallow URL if not in route
body: <p>This is my folder structure.</p>
  
  <pre><code>|--Application
  |-----Controllers
  |--------Dashboard.php
  |--------Projects.php
  |-----Models
  |--------dashboardModel.php
  |--------projectsModel.php
  |-----Views
  |--------dashboard (folder)
  |-----------index.php
  |-----------projects (folder)
  |--------------add.php
  |--------------index.php
  </code></pre>
  
  <p>Now, in my route file I have the following:</p>
  
  <pre><code>$route['default_controller']  = "dashboard";
  
  $route['dashboard/projects']        = "projects";
  $route['dashboard/projects/add']    = "projects/add";
  </code></pre>
  
  <p>Now the problem: if I type in the url <code>http://myproject/dashboard/projects</code> it works <strong>AND</strong> if I type <code>http://myproject/projects</code> it also works..how do I deny the second url?</p>