我已经在我的项目中为 cms 配置了路由到 cms.m.dev
resources.router.routes.cms.type = "Zend_Controller_Router_Route_Hostname"
resources.router.routes.cms.route = "m.dev"
resources.router.routes.cms.defaults.module = "cms"
resources.router.routes.cms.chains.admin_default.route = "/:controller/:action/*"
resources.router.routes.cms.chains.admin_default.defaults.action = "index"
resources.router.routes.cms.chains.admin_default.defaults.controller = "dashboard"
但现在我遇到了重定向器的问题:
$this->_redirector->gotoUrl('/doctor/edit/');
$this->_redirector->gotoSimple('edit', 'doctor', 'cms');
当我这样称呼它时,它会将我重定向到m.dev/cms/doctor/edit而不是cms.m.dev/doctor/edit。有什么办法可以告诉重定向器模块是子域,而不是子目录?
更新:我创建了路线:
resources.router.routes.cms_doctor_index.route = "/doctor/"
resources.router.routes.cms_doctor_index.type = "Zend_Controller_Router_Route_Static"
resources.router.routes.cms_doctor_index.defaults.module = "cms"
resources.router.routes.cms_doctor_index.defaults.controller = "doctor"
resources.router.routes.cms_doctor_index.defaults.action = "index"
但它仍然将我重定向到 m.dev/doctor/