title: page redirect issue codeigniter : 404 error
body: <p>I'm creating an application using CodeIgniter.</p>
  
  <p>When I enter the correct email and password I should be redirected to dashboard but I get this redirection:/auth/login and it shows 
  <a href="https://i.stack.imgur.com/R2rgJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2rgJ.png" alt="enter image description here"></a> </p>
  
  <p>I may clarify that I allowed mod_rewrite , added the write base_url and allowed connection on apache </p>
  
  <p>My Config.php </p>
  
  <pre><code>   $config['base_url'] = 'http://127.0.0.1:8000/stock-v2/'; 
  </code></pre>
  
  <p>My controller :</p>
  
  <pre><code> public function login()
  {
  
      $this-&gt;logged_in();
  
      $this-&gt;form_validation-&gt;set_rules('email', 'Email', 'required');
      $this-&gt;form_validation-&gt;set_rules('password', 'Password', 'required');
  
      if ($this-&gt;form_validation-&gt;run() == TRUE) {
          // true case
          $email_exists = $this-&gt;model_auth-&gt;check_email($this-&gt;input-&gt;post('email'));
  
          if($email_exists == TRUE) {
              $login = $this-&gt;model_auth-&gt;login($this-&gt;input-&gt;post('email'), $this-&gt;input-&gt;post('password'));
  
              if($login) {
  
                  $logged_in_sess = array(
                      'id' =&gt; $login['id'],
                      'username'  =&gt; $login['username'],
                      'email'     =&gt; $login['email'],
                      'logged_in' =&gt; TRUE
                  );
  
                  $this-&gt;session-&gt;set_userdata($logged_in_sess);
                  redirect('dashboard', 'refresh');
              }
              else {
                  $this-&gt;data['errors'] = 'Incorrect username/password combination';
                  $this-&gt;load-&gt;view('login', $this-&gt;data);
              }
          }
          else {
              $this-&gt;data['errors'] = 'Email does not exists';
  
              $this-&gt;load-&gt;view('login', $this-&gt;data);
          }   
      }
      else {
          // false case
          $this-&gt;load-&gt;view('login');
      }   
  }
  
      */
  public function logout()
  {
      $this-&gt;session-&gt;sess_destroy();
      redirect('auth/login', 'refresh');
  }
  </code></pre>
  
  <p>Can anyone help?</p>