The following code wont allow for dashes you’ll get a 404
/** url manager */
'urlManager'=>array(
'urlFormat'=>'path',
'caseSensitive'=>false,
'showScriptName'=>false,
'rules'=>array(
'home'=>'site/index',
'contact'=>'site/contact',
'<view:\w+>'=>'site/page',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
With this code, none of your controllers will work because it tries to load it as a site/page
/** url manager */
'urlManager'=>array(
'urlFormat'=>'path',
'caseSensitive'=>false,
'showScriptName'=>false,
'rules'=>array(
'home'=>'site/index',
'contact'=>'site/contact',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<view>'=>'site/page',
),
),
Is there any way to keep dashes in page names + keep url beautification?