title: 403 forbidden with URI routing in Codeigniter
body: <p>I'm trying to set up routing to a page on my site with Codeigniter, but I just get a 403. I can't understand why. </p>
  
  <p>Code in the routes config file is:</p>
  
  <pre><code>$route['photo/(:num)'] = "viewphoto/view/$1";
  $route['photo'] = 'photo';
  
  $route['photos'] = "photospage/index";
  $route['photos'] = 'photos';
  
  $route['default_controller'] = 'homepage';
  $route['homepage'] = 'homepage';
  </code></pre>
  
  <p>When going to mysite.com/photo/2 (for example) it works fine, as does the homepage. But when going to mysite.com/photos I just get a 403 Forbidden error message. </p>
  
  <p>I can't work it out, the routing is set to exctly the same as the mysite.com/photo/2 routing. </p>
  
  <p>The controller it's pointing to is called photospage and the function inside it is called index. </p>
  
  <p>If I go to mysite.com/photos/index it works though...</p>
  
  <p>Any help is most appreciated :)</p>
  
  <p><strong>EDIT:</strong> </p>
  
  <p>Change the routes config file to the following but it still doesn't work when I go to mysite.com/photos. I changed the controller function to a 'view' instead of 'index' but it still won't work :(</p>
  
  <pre><code>$route['photos'] = "photos/view";
  $route['photo/(:num)'] = "viewphoto/view/$1";
  $route['default_controller'] = 'homepage';
  </code></pre>
  
  <p>homepage and photo/$id still work fine though.</p>