Hi, i use this method. If redirect another domain, the session is not modified, but i redirect one page, the session is modified.
if(isset($_GET['cat'])) {
$id = $_GET['cat'];
$url = Yii::app()->getBaseUrl(true);
Yii::app()->session['cat'] = $id;
//var_dump(Yii::app()->session['cat']); exit;
if($url == 'http://example.com' && Yii::app()->session['cat'] == 1) {
$this->redirect('http://example2.com'); //dont work
}
else {
$this->redirect(Yii::app()->baseUrl.'/'); //work
}
}
wisp
(Wisp)
2
Try session_write_close() just before the redirect
It’s doesn’t work. 
When i redirect to another domain, the session variable is the before page variable.
I use the session->close and the session->closeSession-s, but dont work…
if(isset($_GET['cat'])) {
$id = $_GET['cat'];
$url = Yii::app()->getBaseUrl(true);
Yii::app()->session['cat'] = $id;
Yii::app()->session->close();
if(Yii::app()->session->closeSession()) {
if($url == 'http://example.com' && Yii::app()->session['cat'] == 1) {
$this->redirect('http://example2.com'); //dont work
}
else {
$this->redirect(Yii::app()->baseUrl.'/'); //work
}
}
}
The 2 domain is running in one yii app.