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
}
}
Page 1 of 1
Session create/modify
#1
Posted 17 April 2012 - 09:45 AM
Hi, i use this method. If redirect another domain, the session is not modified, but i redirect one page, the session is modified.
#3
Posted 17 April 2012 - 10:21 AM
#4
Posted 17 April 2012 - 01:33 PM
I use the session->close and the session->closeSession-s, but dont work...
The 2 domain is running in one yii app.
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.
Share this topic:
Page 1 of 1

Help















