title: getting 404 after submitting login form in codeigniter
body: <p>I am facing problem with login form it gives 404 when I submit the form. Is it a routing issue or some thing else because my .htacess file is already in root and fine ?
  Here is my controller:</p>
  
  <pre><code>if ( ! defined('BASEPATH')) exit('No direct script access allowed');
      class Login extends MX_Controller
      {  
      function __construct() {
      parent::__construct();
      $this-&gt;load-&gt;library('session');
      }  
  
   function index(){
           $this-&gt;load-&gt;view('login_form');
  
      }
      public function submit_login()
          {
              $username = $this-&gt;input-&gt;post('txtUserName');
              $password = $this-&gt;input-&gt;post('txtPassword');
              //echo "...../////".$username . " dsds" .$password;exit;
  
                  $row = Modules::run('admin_users/_get_where_login',$username, $password )-&gt;row_array();
  
                      if (empty($row)) {
                          //echo "Invalid user name........."; exit();
                          redirect(ADMIN_BASE_URL);
                          exit();
                      }
  
                      if(!empty($row) &amp;&amp; isset($row)) {
  
                          $data['all_data'] = $row;
                          $this-&gt;session-&gt;set_userdata('user_data', $data);
                          $user_data = $this-&gt;session-&gt;userdata('user_data'); 
  
                      }
                      redirect(ADMIN_BASE_URL.'dashboard');
          }
  
  
      function logout(){
          session_destroy();
          session_write_close();
          $this-&gt;session-&gt;unset_userdata('user_data');
          $this-&gt;index(); 
          }
  
      }
  </code></pre>
  
  <p>Here is my view file</p>
  
  <pre><code> &lt;div class="panel-body"&gt;
                 &lt;p class="text-center pv"&gt;SIGN IN TO CONTINUE.&lt;/p&gt;
                 &lt;?php
  
            $attributes = array('autocomplete' =&gt; 'off', 'id' =&gt; 'login');
            echo form_open(ADMIN_BASE_URL.'login/submit_login',$attributes);
            echo '&lt;div class="form-group has-feedback"&gt;';
            $data = array(
                'name'        =&gt; 'txtUserName',
                'id'          =&gt; 'txtUserName',
                'class'       =&gt; 'form-control',
                'value'       =&gt; '',
              );
        echo form_input($data);
        echo '&lt;span class="fa fa-envelope form-control-feedback text-muted"&gt;&lt;/span&gt;';
        echo '&lt;/div&gt;';       
  
        echo '&lt;div class="form-group has-feedback"&gt;';
            $data = array(
                'name'        =&gt; 'txtPassword',
                'id'          =&gt; 'txtPassword',
                'class'       =&gt; 'form-control',
                'type'        =&gt;'password',
                'value'       =&gt; '',
              );
        echo form_input($data);
        echo '&lt;span class="fa fa-lock form-control-feedback text-muted"&gt;&lt;/span&gt;';
        echo '&lt;/div&gt;';         
  
           ?&gt;            
  
                    &lt;button type="submit" class="btn btn-block btn-primary mt-lg"&gt;Login&lt;/button&gt;
                 &lt;/form&gt;
  
              &lt;/div&gt;
           &lt;/div&gt;
  </code></pre>
  
  <p>
  here is .htacess</p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|resources|static|uploads|robots\.txt)
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteRule ^(.*)$ index.php/$1 [L,QSA]
  RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA] 
  
  #Redirect www to non-www
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  </code></pre>