url rewriting

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.

See the section in the guide about hiding index.php

http://www.yiiframework.com/doc/guide/topics.url

My first guess is you should write http://site.com/index.php/yourcontroller/youraction

/Tommy

I already hide the index, I forget to say you if i use index action url rewrite work nice

Does this work?

http://yoursite.com/site/hotel_ischia&param=value

Edit:

Sorry, I meant you could try

http://yoursite.com/site/hotel_ischia

and

http://yoursite.com/site/hotel_ischia/param/value

Sorry, I have found the problem index.php isn’t hide :S ,I already modify the .htaccess and urlmanager don’t work properly.

sorry for waste time i found the solution i forget to allow symlink in apache for anyone have problem read all comment under dookbook thanks all