2014-01-06 31 views
0

對不起,我是新的bie,我在Yii框架中工作友好的網址。索引頁是好的,但是當我輸入參數編輯時,url不友好。我們如何隱藏yii框架的url中的參數?

索引頁:http://localhost/news/news/index.html

編輯頁面:http://localhost/news/news/edit/59.html

我們如何隱藏ID PARAM並有網址是這樣的:

http://localhost/news/news/edit.html

這裏是main.php的配置

'urlManager'=>array(
      'urlFormat'=>'path',  
      'showScriptName' => false, 
      'urlSuffix'=>'.html',     
      'rules'=>array(   
       '<controller:\w+>/<id:\d+>'=>'<controller>/view', 
       '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', 
       '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', 
      ), 
     ), 

非常感謝

回答