title: Codeigniter - the requested URL was not found on this server
body: <p>For the last couple of days my frustration has grown to new heights. Im trying to do a simple login system in codeigniter and I cant get it to work properly.</p>
  
  <p>when submitting the login form I get the following error: </p>
  
  <p>The requested URL /wishlist/login_controller/login was not found on this server.</p>
  
  <p>Here is the form:</p>
  
  <pre><code>&lt;form method="post" action="&lt;?php echo base_url()?&gt;login_controller/login"&gt;
  &lt;input type="text"placeholder="E-mail" id="email" name="email"&gt;
  &lt;input type="password" placeholder="Password" id="password" name="password"&gt;
  &lt;input class="btn btn-primary span2" type="submit" id="sign-in" value="Sign In"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is my login function in login_controller:</p>
  
  <pre><code>class Login extends CI_Controller {
  
  
  function login() {
  
      $data['error'] = 0;
  
      if ($_POST) {
  
          $this-&gt;load-&gt;model('user_model');
          $email = $this-&gt;input-&gt;post('email', true);
          $password = $this-&gt;input-&gt;post('password', true);
          $user = $this-&gt;user_model-&gt;login($email, $password);
  
          if (!$user) {
              $data['error'] = 1;
          } else {
              $this-&gt;session-&gt;set_userdata('userID', $user['userID']);
              $this-&gt;session-&gt;set_userdata('firstname',    $user['firstname']);
  
              redirect(base_url().'admin_controller');
  
          }
      }
  
      $this-&gt;load-&gt;view('home_view');
  }
  </code></pre>
  
  <p>I'm using wampserver on localhost. Here is the url that it tries to access:
  localhost/wishlist/login_controller/login</p>
  
  <p>Am I correct in assuming that the first part after base_url() is the controller and the second part is the function in that controller?</p>
  
  <p>A couple of settings from the config folder. </p>
  
  <pre><code>$config['base_url'] = '';
  $config['index_page'] = 'index.php';
  $route['default_controller'] = "site_controller";
  </code></pre>