编辑 现在有在symfony中这样做的2.2Symfony2的子域路由 - 不同的包
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
可以在域中使用的参数以及
编辑OVER
的可能性将此标记为一个副本之前,请阅读
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
我怎么会去这样做?
我运行一个类似的设置。您是否在应用程序之间共享供应商目录? – noisebleed
是的,我们有我们自己的内部库,我们在这里放置外部库,如Symfony的核心。我修改了bin/vendor文件和一切以更新每个应用程序 – Ascherer