Logout not redirecting in the way as expected. I use the following to redirect
$this->redirect(Yii::app()->baseUrl); the error i get is "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
I mostly think this is due to the headers already sent issue. I user ob_start and ob_flush… But doesnt help. Any ideas?
In my controller Yii::app()->homeUrl echoes index.php, where as Yii::app()->baseUrl value is empty. But in my view the baseUrl echoes the value i.e url
That would work , the problem is i have written .htaccess for removing index.php from the site, but when logging out, it prompts me with mywebsite.com.index.php… so do we have any urlManagement to redirect if the url comes as mywebsite.com/index.php
public function actionLogout()
{
Yii::app()->user->logout();
$this->redirect(Yii::app()->homeUrl);
// $this->redirect(Yii::app()->baseUrl); //Or Try this
}