title: 404 not found on Codeigniter
body: <p>I am trying to access my page 'login', and I'm using Codeingiter.</p>
  
  <p>I'm using TAL php too, for templates.</p>
  
  <p>I just defined my routes like this:</p>
  
  <pre><code>$route['default_controller'] = "site";
  $route['404_override']       = '';
  
  $route['login']   = 'login';
  $route['signup']  = 'login';
  $route['success'] = 'login';
  </code></pre>
  
  <p>And here is my 'login' controller :</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Login extends CI_controller{
  
  public function __construct(){
  
      parent::__construct();
      $this-&gt;tal-&gt;setOutputMode(PHPTAL::HTML5);
          if($this-&gt;session-&gt;userdata('loggedIn') == true){
              $this-&gt;tal-&gt;template = 'admin';
              $this-&gt;tal-&gt;login = true;   
          }else{
              $this-&gt;tal-&gt;template = 'main';
              $this-&gt;tal-&gt;login = false;              
          }
      $this-&gt;load-&gt;model('membership_model');
  }
  
  public function index(){
  
      $requestPage = $this-&gt;uri-&gt;segment(1);
  
      switch($requestPage){
          case 'login':
              $this-&gt;tal-&gt;title = 'Connexion';
              $this-&gt;tal-&gt;display('login.php');
  
          break;
          case 'signup':
              $this-&gt;tal-&gt;title = 'Inscription';
              $this-&gt;tal-&gt;display('signup.php');
              $this-&gt;createMember();  
          break;
          case 'success':
              $this-&gt;tal-&gt;title = 'Inscription validée!';
              $this-&gt;tal-&gt;display('messagePage/signupSuccess.php');
          break;
      }
  }
  
  function validateCredentials(){
  
      $query = $this-&gt;membership_model-&gt;validate();
          if($query){
              $userdata = array(
                  'username' =&gt; $this-&gt;input-&gt;post('username'),
                  'password' =&gt; md5($this-&gt;input-&gt;post('password')),
                  'loggedIn' =&gt; true
              );
              $this-&gt;session-&gt;set_userdata($userdata);
              redirect('backoffice/profile/#');       
          }
      $this-&gt;index();
  }
  
  function createMember(){
  
      $this-&gt;load-&gt;library('form_validation');
      $this-&gt;form_validation-&gt;set_rules('name', 'Nom', 'trim|required');
      $this-&gt;form_validation-&gt;set_rules('forename', 'Prénom', 'trim|required');
      $this-&gt;form_validation-&gt;set_rules('email', 'Email', 'trim|required|valid_email');
      $this-&gt;form_validation-&gt;set_rules('adress', 'Adresse', 'trim|required');
      $this-&gt;form_validation-&gt;set_rules('zipcode', 'Code Postal', 'trim|is_natural|required');
      $this-&gt;form_validation-&gt;set_rules('city', 'Ville', 'trim|required');
      $this-&gt;form_validation-&gt;set_rules('country', 'Pays', 'trim|required');
      $this-&gt;form_validation-&gt;set_rules('username', 'Pseudo', 'trim|required|callback_usernameCheck');
      $this-&gt;form_validation-&gt;set_rules('password', 'Mot de passe', 'trim|required|min_length[4]|max_length[32]');
      $this-&gt;form_validation-&gt;set_rules('password2', 'Confirmation du mot de passe', 'trim|required|matches[password]');
      $this-&gt;form_validation-&gt;set_rules('captcha', 'Captcha');
  
      $data = array(
          'firstname'      =&gt; $this-&gt;input-&gt;post('name'),
          'forename'       =&gt; $this-&gt;input-&gt;post('forename'),
          'username'       =&gt; $this-&gt;input-&gt;post('username'),
          'email'          =&gt; $this-&gt;input-&gt;post('email'),
          'adress'         =&gt; $this-&gt;input-&gt;post('adress'),
          'zipcode'        =&gt; $this-&gt;input-&gt;post('zipcode'),
          'city'           =&gt; $this-&gt;input-&gt;post('city'),
          'country'        =&gt; $this-&gt;input-&gt;post('country'),
          'password'       =&gt; $this-&gt;input-&gt;post('password'),
          'passwordHashed' =&gt; md5($this-&gt;input-&gt;post('password'))
      );
  
      if($this-&gt;form_validation-&gt;run() == false){}
      else{
          $result = $this-&gt;membership_model-&gt;usernameCheck();
          var_dump($result);
          switch($result){
              case false:echo 'false';
                  $this-&gt;form_validation-&gt;set_message('', 'Désolé mais ce nom d\'utilisateur et / ou cet email sont déjà pris');
              break;
              case true:echo 'true';
                  $this-&gt;membership_model-&gt;createMember($data);
                  redirect('success');
              break;
          }
      }
  }
  
  function logout(){  
      $this-&gt;session-&gt;sess_destroy();  
      redirect('/'); 
  }
  
  }//this ends class
  </code></pre>
  
  <p>My local URL is : <code>http://localhost/dist.</code></p>
  
  <p>And when I try to access it, with the URL <code>http://localhost/dist/login</code>,  I just get '404 Page Not Found : The page you requested was not found.'</p>
  
  <p>I don't understand why. All is ready.</p>