2017-11-20 2 views
-1

でのSymfony 3で複数のウェブサイトを作る私はいくつかのケースでは、このような同じルーティングとsymfonyでマルチサイト管理を行うことを試みた:どのように同じルート


fos_user: 
    resource:"@FOSUserBundle/Resources/config/routing/all.xml" 
fos_js_routing: 
    resource:"@FOSJsRoutingBundle/Resources/config/routing/routing.xml" 
admin_site: 
    resource:"@AppBundle/Controller/Admin" 
    type: annotation 
site_1: 
    resource:"@AppBundle/Controller" 
    type: annotation 
    host: www.site1.com 
site_2: 
    resource:"@AppBundle/Controller" 
    type: annotation 
    host: www.site2.com 
site_2: 
    resource:"@AppBundle/Controller/Site2Addon" 
    type: annotation 
    host: www.site2.com 

しかし、それは動作しません。最後の設定で上書きされます。

答えて

0

私は同様の問題を抱えています:Multiple routes with multiple domains

ルート名とリソースパスの両方が一意である必要があります。あなたのリソース"@AppBundle/Controller"とあなたのルート名site_2は一意ではありません。

関連する問題