I am trying to design friendly urls for an application I am developing.
Currently, I am trying to do that via parametirizing routes. I have the following code:
'urlFormat'=>'path', 'showScriptName'=>false, 'rules'=>array( '<_a:(contact)>/<lang:\w+>' => '<_a>', ),
What I don’t like is that my urls look like this: mydomain.com/site/contact/lang/en
What should I change to achieve: mydomain.com/contact/en through Parameterizing routes.
I can achieve this with ‘pattern1’=>‘route1’, but I want to achieve it with parameterizing routes method so I can use the expression to reduce the number or rules for better performance as advised in the article. Any help would be appreciated.