php – Symfony2子域路由 – 不同的捆绑包

编辑
现在有可能在symfony 2.2中这样做
PlatformFooBundle:
    resource: "@PlatformFooBundle/Resources/config/routing.PHP"
    domain: foo.testdomain.com

PlatformBarBundle:
    resource: "@PlatformBarBundle/Resources/config/routing.PHP"
    domain: bar.testdomain.com

PlatformBazBundle:
    resource: "@PlatformBazBundle/Resources/config/routing.PHP"
    domain: baz.testdomain.com

您也可以使用域中的参数

编辑过

在将此标记为重复之前,请继续阅读

http://www.craftitonline.com/2011/08/symfony2-locale-on-subdomains-not-on-the-url-path/

我读过这篇文章,但它并没有帮助我做我想做的事情.

我有3个不同的应用程序在相同的域名上运行,具有单独的子域名.目前,他们都在自己的symfony安装中运行,我想摆脱它.

foo.testdomain.com
bar.testdomain.com
baz.testdomain.com

每个都使用不同的捆绑

PlatformFooBundle
PlatformBarBundle
PlatformBazBundle

他们每个人都有自己的路线定义.

基本上,我想要的是这个

PlatformFooBundle:
    resource: "@PlatformFooBundle/Resources/config/routing.PHP"
    subdomain: www|devwww

PlatformBarBundle:
    resource: "@PlatformBarBundle/Resources/config/routing.PHP"
    subdomain: bar|devbar

PlatformBazBundle:
    resource: "@PlatformBazBundle/Resources/config/routing.PHP"
    subdomain: baz|devbaz

我该怎么做呢?

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...