Well, deleted my previous question and reformulated a new one, otherwise no one would have understood, sorry. So, here is the problem that remains:
So, I want to rewrite the URL to one word that works with zero, one and two parameters, but not with 3:
Original URL with two parameters:
index.php?r=site/page&view=exposities&tijd=nu
Urlmanager rule:
'exposities_nu'=>array('site/page', 'defaultParams' => array('view' => 'exposities', 'tijd'=>'nu')),
result:
/exposities_nu/
Now what does not work:
Original URL with three parameters:
index.php?r=site/page&view=exposities&tijd=vestiging&locatie=1
Urlmanager rule:
'knsm'=>array('site/page', 'defaultParams' => array('view' => 'exposities', 'tijd'=>'nu', 'locatie'=>'1')),
result:
index.php?r=site/page&view=exposities&tijd=vestiging&locatie=1
Anyone why this last url is not shortened to / knsm /?
source
share