i have a logout link which is directed to a function in the controller. But i get an error when i run the program.please help
Home.php
<div align='left'>
<a href ='<?php echo base_url()."main/logout" ?>'>Log Out</a>
</div>
Main controller
public function logout()
{
$this->session->sess_destroy();
redirect('main/login');
}
I get this error when i click log out
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost Tue Oct 28 15:46:16 2014 Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1