Need help with createUrl

Hi,

ok, what I’m doing is creating an url in a view as follows:




<?php echo Yii::app()->createUrl('faq/index', array('cid' => $categories->fca_id))?>



(tried with $this too)

and I’m having following set of url rules:




    'en/faq/index/<cid>' => 'faq/index',

    'faq/index/<cid>' => 'faq/index',


    '<lang:\w{2}>/faq/<action:\w+>/<cid:\d+>' => 'faq/<action>',

    '<lang:\w{2}>/faq/<action:\w+>/<cid:\d+>/<scid:\d+>' => 'faq/<action>',

    '<lang:\w{2}>/register/<action:\w+>/<id:\w+>/<code:\w+>' => 'register/<action>',


    '<lang:\w{2}>/<controller:\w+>/<action:\w+>/<id:\d+>/<title:\w+>' => '<controller>/<action>',

    '<lang:\w{2}>/<controller:\w+>/<action:\w+>/<id:\d+>/<title:\w+>/<id2:\d+>/<title2:\w+>' => '<controller>/<action>',


    '<lang:\w{2}>/<controller:\w+>/<id:\d+>'=>'<controller>/view',

    '<lang:\w{2}>/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

    '<lang:\w{2}>/<controller:\w+>/<action:\w+>'=>'<controller>/<action>',



The top 2 rules is me trying to hardcode the rules, and still they don’t apply,

and I am getting http://mysite/faq/index/cid/1

I want to remove the ‘cid’, I sort of did everything it said in the manual, but it doesn’t work,

Please help!

Try changing ‘cid’ to ‘id’