hi all,
(first of alla sorry for my english I’m italian)
I have some problem with url rewriting, please can someone help me,
this is the action in controller:
public function actionhotel_ischia(){
$criteria=new CDbCriteria;
if (isset($_GET[stelle]) && $_GET[stelle]!='' && (!isset($_GET[comune]) or $_GET[comune]=='')){
$criteria->condition="stelle='$_GET[stelle]'";
}
elseif (isset($_GET[comune]) && $_GET[comune]!='' && (!isset($_GET[stelle]) or $_GET[stelle]=='')){
$criteria->condition="comune='$_GET[comune]'";
}
elseif (isset($_GET[comune]) && $_GET[comune]!='' && isset($_GET[stelle]) && $_GET[stelle]!=''){
$criteria->condition="comune='$_GET[comune]' && stelle='$_GET[stelle]'";
}
$hotels=hotel::model()->findall($criteria);
$offerte=offerte::model()->findAll();
$this->render('hotel-ischia',array('model_hotels'=>$hotels,'model_offerte'=>$offerte));
$this->createUrl('site/hotel-ischia',array('stelle'=>3));
}
and this urlmanager in config file:
'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'hotel-ischia/hotel_<stelle:/d{1}>_stelle_ischia'=>array('site/hotel-ischia','urlSuffix'=>'.html'),
),
),
I try to figure out the page in some different mode but the browere show me always the home page.
If I write http://site.com/ or http://site.com/r=index/hotel-ischia&stelle=3 I have always the same result. If i write http://site/hotel-ischia/hotel_3_stelle_ischia.html don’t return me nothing.
if I toggle the urlmanager in configuration file it work normally.