Yii url manager only ID in url
问题 i have in YII for example domain: www.example.com/product-url-1234 how to set rules in urlManager and how to use controller/action/id 回答1: If you want to use this url www.example.eu/product-url-1234 and suppose 'index' is the name of the action of the 'user' controller that will handle the request Then create a rule like '<id:.*?>'=>'user/index' Now if you will use Yii::app()->createUrl('user/index',array('id'=>'product-url-1234')) then it will give you the desired result. And if you Visit