title: Codeigniter login 404
body: <p>I just started working with CI and I'm trying to make an login. I have read a few tutorials and then tried to make one myself but it doesn't work. When i try to login ig get an error:</p>
  
  <blockquote>
    <p>The requested URL /Helptor/login_controller/going_in was not found on this server.</p>
  </blockquote>
  
  <p>I've tried many things but nothing worked.</p>
  
  <p><strong>This is the login form in my login view:</strong></p>
  
  <pre><code>&lt;form action="&lt;?php echo base_url();?&gt;login_controller/going_in" method="post" name="going_in"&gt;
  &lt;?php if(! is_null($msg)) echo $msg;?&gt;
  &lt;table style="font-size: 30px;"&gt;
      &lt;tr&gt;
          &lt;td&gt;Username: &lt;/td&gt;
          &lt;td&gt;&lt;input type="text" size="45" name="username" style="background-color: #C5D2F5;"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Password: &lt;/td&gt;
          &lt;td&gt;&lt;input type="password" size="45" name="password" style="background-color: #C5D2F5;"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type="submit" value="Login" style="border-width: 2px; height: 40px; width: 120px; font-family: Calibri; font-size: 22px; background-color: #FEFEFF;"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;a href="?lang=en"&gt;&lt;img src="&lt;?= base_url() ?&gt;assets/img/United_Kingdom(Great_Britain).png"/&gt;&lt;/a&gt;&amp;nbsp;
              &lt;a href="?lang=nl"&gt;&lt;img src="&lt;?= base_url() ?&gt;assets/img/Netherlands.png"/&gt;&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Login_controller:</strong></p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  class login_controller extends CI_Controller{
  
  function __construct(){
      parent::__construct();
  }
  
  public function index($msg = NULL){
      $this-&gt;load-&gt;database();
      $this-&gt;load-&gt;helper('url');
      $data['msg'] = $msg;
      $this-&gt;load-&gt;view('login', $data);
  }
  
  public function going_in(){
      // Load the model
      $this-&gt;load-&gt;model('login_model');
      // Validate the user can login
      $result = $this-&gt;login_model-&gt;validate();
      // Now we verify the result
      if(! $result){
          // If user did not validate, then show them login page again
          $msg = '&lt;font color=red&gt;Invalid username and/or password.&lt;/font&gt;&lt;br /&gt;';
          $this-&gt;index($msg);
      }else{
          // If user did validate, 
          // Send them to members area
          redirect('user');
      }        
    }
  }
  ?&gt;
  </code></pre>
  
  <p><strong>Login_model:</strong></p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Login_model extends CI_Model{
  function __construct(){
      parent::__construct();
  }
  
  public function validate(){
      // grab user input
      $username = $this-&gt;security-&gt;xss_clean($this-&gt;input-&gt;post('username'));
      $password = $this-&gt;security-&gt;xss_clean($this-&gt;input-&gt;post('password'));
  
      // Pre ping the query
      $this-&gt;db-&gt;where('username', $username);
      $this-&gt;db-&gt;where('password', $password);
  
      // Run the query
      $query = $this-&gt;db-&gt;get('users');
      //check for results
      if($query-&gt;num_rows == 1)
      {
          //create session data
          $row = $query-&gt;row();
          $data = array(
                  'id' =&gt; $row-&gt;ID,
                  'username' =&gt; $row-&gt;Username,
                  'level' =&gt; $row-&gt;Level,
                  'validated' =&gt; true
                  );
          $this-&gt;session-&gt;set_userdata($data);
          return true;
      }
      return false;
    }
  }
  ?&gt;
  </code></pre>
  
  <p><strong>Base_url:</strong></p>
  
  <pre><code>$config['base_url'] = 'http://localhost/Helptor/';
  </code></pre>
  
  <p><strong>Index_page:</strong></p>
  
  <pre><code>$config['index_page'] = '';
  </code></pre>
  
  <p><strong>Uri_protocol:</strong></p>
  
  <pre><code>$config['uri_protocol'] = 'AUTO';
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>My .htaccess file in the map application looks like this</p>
  
  <blockquote>
    <p>Deny from all</p>
  </blockquote>
  
  <p><strong>Update 2</strong></p>
  
  <p>This is my folder structure:</p>
  
  <pre><code>localhost/helptor
   -application
     -controllers
       -index.html
       -login_controller.php
       -user.php
     -models
       -login_model.php
       -index.html
     -views
       -.htaccess
       -index.html
       -login.php
       -user.php
     .htaccess
     index.html
   -assets
   -system
   index.php
  </code></pre>