php - how to rewrite url formatting with parameter name in yii -
I am very new to Yii, usually yii works like this url format
baseurl / app_dir / conroller / action / parametername / vaule but I want to show it like this
baseurl / app_dir / conroller / Action / vaule means the parameter is without name
I read a lot of solutions but could not find, how to do this, please help me .
This is somewhere in the docs, here is an example:
'/ User / & lt; Id: \ w + & gt; / '= & Gt; 'User / view /'
This means that the request will be directed to
/ user / someUserName
view in the administrator
User with parameter
id with value
someUserName . In this way you have the URL with the price only, but in the application it is available as the
$ _ GET parameter name.
Note :
\ w + is only regex, which are supported here, for example you
\ d + Can use value for numerical etc.
Comments
Post a Comment