Calling this function to redirect me to the login webpage throw me '404 Error : the page you requested was not found'. I have followed the same steps that i followed for another application and it worked fine. Any Ideas?
Link
<li>
<a href="<?= base_url('auth/logout') ?>">Salir</a>
</li>
Ion Auth function
// log the user out
public function logout() {
$this->data['title'] = "Logout";
// log the user out
$logout = $this->ion_auth->logout();
// redirect them to the login page
$this->session->set_flashdata('message', $this->ion_auth->messages());
redirect('auth/login', 'refresh');
}
Base_url
$config['base_url'] = 'http://localhost/herba/';
Change this
public function logout() {
$this->data['title'] = "Logout";
// log the user out
$logout = $this->ion_auth->logout();
// redirect them to the login page
$this->session->set_flashdata('message', $this->ion_auth->messages());
redirect(base_url('auth/login'), 'refresh');
}
please make sure
http://localhost/herba/auth/login
exist
Also check with index.php
http://localhost/herba/index.php/auth/login