[eluser]Larry Wakeman[/eluser]
I am doing a logout by passing an additional segment 'logout' so I am going to /foo/bar/logout. In the logout code in the index function of my controller (I am using a single controller with a wild card route and letting the controller decide if the page exists and to display the correct content) so I put the following in:
Code:
if (stripos(uri_string(), 'logout') !== false)
{
// perform a logout
$this->cicms_login->logout();
unset ($this->a_uri[(count($this->a_uri))]);
// redirect(substr(uri_string(), 0, stripos(uri_string(), 'logout')-1));
redirect('/foo/bar', 'refresh');
}
// display the page
As it is, the page is redirected to /foo/bar/foo/bar.