Reputation: 666
I have a Yii project, where I want to have URLs like this:
http://module.project.tld/controler/action?param1=value1¶m2=value2
My system understands these, and as a programer, I like it better, then the one is generated (some lines below)
I have multiple modules btw...
So when I use something like this in the controller:
$this->createUrl('controler/action', array('param1' => 'value1'));
then it becomes: /controler/action/param1/value1
I know this is the "pretty URL" what people using in public systems to create user friendly URLs, but my system can not understand it, and personally I don't like it, so here is my question:
How could I force Yii's URL generator, to create the format, what I need?
Upvotes: 1
Views: 511
Reputation: 14860
You can set CUrlManager::appendParams
to false in your config/main.php
.
'urlManager'=>array(
'urlFormat'=>'path',
'appendParams'=>false,
...
Upvotes: 2