module 有两个( front[网站前端] , adminmanage[网站管理端] )
前端做url地址重写时,希望只是将front这个module重写到网站根目录,
我现在是这样处理的
'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, 'urlSuffix'=>'.html', 'rules'=>array( //新闻中心 'news/*' => 'front/news/index', //关于 'about'=>'front/about/about', 'contact'=>'front/about/contactus', 'sitemap'=>'front/default/sitemap', //产品 'product/*'=>'front/product/index', //人力资源 'hr/*'=>'front/hr/index', 'job/*'=>'front/hr/list', //网络建议 'network/*'=>'front/network/index', //FAQ 'faq/*'=>'front/faq/index', ), ),
如果这样处理,前端其它的地址全部都要进行配置.感觉很麻烦!
如果将front module里的控制器,以及视图文件移动到application.controllers下,这样要修改的链接比较多.
问题一:
有没有方法有现有的基础上,在urlManager的有一条规则可以将front这个module重写到网站根目录下呢?
问题二:
上面配置后的adminmanage module所有的链接地址都加上了.html
能否地址重写时只重写front module 不重写 adminmanage module