'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