Path url with form GET

I am trying to use path url format by setting ‘urlFormat’=>‘path’, in config. It works fine, except that I have a form which uses GET (I can’t use post as I need to link to this). Below is the form code.




<form action="" method="get">

	 <input type="hidden" name="r" value="search"/>

	  <input class="input-xlarge" type="text" placeholder="Search" name="s">	

       	    <button class="btn" type="submit">Search</button>

          </form> 

Problem is this works fine when I don’t set ‘urlFormat’=>‘path’. But with urlformat set to path all other url appears nicely but when this form is submitted, The new url (controller/action part with param) gets appended to the current url. But the action works as expected and hows the correct results, only the url appears to be messed up. I did some searching and it looks like using the get method and path url is a bit tricky but couldn’t find any instance/example that matches mine exactly. I have .htaccess set up to hide the index.php but that doesn;t seem to be the problem as it exists even after I remove the .htaccess and keep index.php in the url. I am really clueless about this and could really use some help. Thanks.

I have the same question as you.

and now my solution is change the method to POST .then POST the data to a second web page

then Yii::app()->redirect(Yii::app()->createUrl(‘xx’,array(“r”,$_REQUEST[‘r’])));