title: Codeigniter 2.1 - redirect to current url after logout
body: <p>How can I redirect to current url after logout?</p>
  
  <p>HTLM for logout:</p>
  
  <pre><code>&lt;a href="&lt;?php echo base_url() ?&gt;korisnik/logout"&gt;Logout&lt;/a&gt;
  </code></pre>
  
  <p>Controller function:</p>
  
  <pre><code>function logout() { 
          $this-&gt;session-&gt;sess_destroy();
          redirect(base_url()); 
      }
  </code></pre>