Yii Framework Forum: 路由不起作用 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

路由不起作用 Rate Topic: -----

#1 User is offline   huangcongg 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 13-March 13

Posted 13 March 2013 - 11:48 PM

'urlManager'=>array(
'urlFormat'=>'path',
'rules'=>array(
'login' => 'user/auth/login',
'logout' => 'user/auth/logout',
'hr.aaa.com/'=>array('hr', 'urlSuffix'=>'/'),
'hr.aaa.com/resume/<id:\d+>'=>'hr/resume/index',
'resume/photo/<id:\d+>'=>'hr/resume/photo/<id>',
'hr.aaa.com/apply/<id:\d+>'=>array('hr/default/apply'),
'hr.aaa.com/view/<id:\d+>'=>array('hr/default/view'),
'hr.aaa.com/<controller:\w+>/<action:\w+>/<id:\d+>'=>'hr/<controller>/<action>',
'hr.aaa.com/<controller:\w+>/<action:\w+>'=>'hr/<controller>/<action>',
'hr.aaa.com/<controller:\w+>'=>array('hr/<controller>', 'urlSuffix'=>'/'),

'i.aaa.com'=>array('forum/site/index', 'urlSuffix'=>'/'),
'i.aaa.com/faq'=>'site/faq',
'i.aaa.com/blog'=>'blog/site/index',
'i.aaa.com/forum'=>'forum/site/index',
'i.aaa.com/<controller:\w+>/<id:\d+>'=>'<controller>/view',
'i.aaa.com/<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'i.aaa.com/<module:\w+>/<controller:\w+>/<action:\w+>'=>'<module>/<controller>/<action>',
'i.aaa.com/<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
'showScriptName'=>false,
'urlSuffix'=>'.html',
),

只有hr.aaa.com 和 i.aaa.com起作用,其他都不起作用,哪里出错了(域名是带http: //的,由于论坛发帖限制url,所以去掉了)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users