title: Logout on Codeigniter
body: <p>I am working on Codeigniter and issue is unable to logout. Below is my codes.
  Controller 'Login' has a function for logout.</p>
  
  <pre><code>function logout(){
  //session destroy
  }
  </code></pre>
  
  <p>View is login_view has a link with href</p>
  
  <pre><code>&lt;a href="logout"&gt;Logout&lt;/a&gt;
  </code></pre>
  
  <p>Added routes as below</p>
  
  <pre><code>$route['logout'] = 'Login/logout';
  </code></pre>
  
  <p>However when clicking on the link it redirects to the link 
  <a href="http://localhost:8080/po/logout" rel="nofollow noreferrer">http://localhost:8080/po/logout</a> (po is my directory)</p>
  
  <p>Please help, thanks in advance.</p>