friendly urls question

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.

bettor

I seem to have found a way to achieve what I want but another issue is I cannot get the case insensitive to work with parameterizing routes:

Why is ‘caseSensitive’=>false not working in the below code:


'urlFormat'=>'path',

                    'showScriptName'=>false,

                    'rules'=>array(

                        '<_a:(contact|about)>/<lang:\w+>' => array('<_a>/index', 'caseSensitive'=>false),

                    ),

For some reason the above ‘caseSensitive’=>false is not applied. If anybody has any idea please share.

Cheers,

bettor