Reputation: 161
I am using Yii 1.1.14.
I want to convert
http://website.com/controller/action?param1=value1¶m2=value2
to
http://website.com/value1/value2
How to do this in urlManager?
Upvotes: 1
Views: 162
Reputation: 5981
First, check this to hide index.php:
http://www.yiiframework.com/doc/guide/1.1/en/topics.url#hiding-x-23x
Then, the route in config.php should be like this:
'<param1:\w+>/<param2:\w+>'=>'mycontroller/myaction',
The method myaction should accept $param1
and $param2
in its constructor to be passed automatically by Yii.
This would make your app unable to look for other controllers, because that rule will accept every route with 2 words separated by /
Upvotes: 3