0

我有一个包含多个模块的应用程序。每个模块都是其中的不同网站。
我想用不同的主机/域/子域名指向每个模块。
有可能这样做吗?
如果是的话怎么做?

4

1 回答 1

0

我找到了解决方案

[routes]

;; Domain config
routes.site1.type = "Zend_Controller_Router_Route_Hostname"
routes.site1.abstract = true
routes.site1.route = "site1.localhost"
routes.site1.defaults.module = "default"

routes.site2.type = "Zend_Controller_Router_Route_Hostname"
routes.site2.abstract = true
routes.site2.route = "site2.localhost"
routes.site2.defaults.module = "default2"

;; Home Page
routes.inicial.type = "Zend_Controller_Router_Route"
routes.inicial.abstract = true
routes.inicial.route = "inicio"
routes.inicial.defaults.controller = index
routes.inicial.defaults.action = index

routes.site1-inicial.type = "Zend_Controller_Router_Route_Chain"
routes.site1-inicial.chain = "site1,inicial"
routes.site2-inicial.type = "Zend_Controller_Router_Route_Chain"
routes.site2-inicial.chain = "site2,inicial"
于 2013-09-05T20:10:28.727 回答