這是我的網址:我想自定義警予URL
http://localhost/techsupportscam/index.php/question/search/2?category=XP+Support
現在我想轉換爲這樣的事情:
http://localhost/techsupportscam/index.php/question/search/2/XP+Support
我的控制器是question
和方法search
。
我的鏈接是:
<?php echo Yii::app()->createUrl('question/search/',array('id'=>$subCategory->id,'category'=>$subCategory->title)); ?>">
我怎樣才能做到這一點?你們能幫我嗎?
感謝
改寫'配置/ main.php'網址經理。檢查http://stackoverflow.com/questions/17503041/email-verification-in-yii-framework?rq=1 –
我已經取消了我的URL管理器代碼config.php –
在你的案例規則可能就像 ' <控制器:\ W +>/// // '=>' ///' 只需檢查。並使用'.htaccess'如果你不明白。 –