gpt4 book ai didi

php - Symfony2 子域路由 - 不同的包

转载 作者:可可西里 更新时间:2023-11-01 12:35:46 24 4
gpt4 key购买 nike

编辑现在可以在 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

我该怎么做呢?

最佳答案

有一个discussion继续添加此功能。

关于php - Symfony2 子域路由 - 不同的包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10490660/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com