'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'<view>' => array('site/page/view/'),
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
//'index' => array('site/index'),
),
),
我目前在我的main.php文件中有這個頁面。Yii中的靜態頁面問題
我有的問題是,當我查看/index.php/index我已經顯示在頁面文件夾的索引頁,但是當我到/index.php/about我仍然得到index.php文件中的頁面文件夾。
是的,使用規則級聯和第一個匹配規則。這意味着如果您的規則與「」之類的基本匹配,您需要將其添加到規則列表的末尾。 –
thaddeusmt
2010-12-22 22:37:17