0
votes

So I have two sites, one at somethin.site.com, and another is routed to somethin.site.com/prefix/

I'd like to move the /prefix/ bundle to somethinelse.site.com, so I've changed my route set up a bit:

my_bundle:
    resource: "@myBundle/Resources/config/routing.yml"
    host: %host%
    requirements:
        _scheme:  https

The problem is now when I go to either URL, somethin.site.com, or somethinelse.site.com, I receive the main site bundle, which has a prefix of '/'. Is there something I'm missing?

EDIT: Interestingly, moving host and main_host params to under requirements got it to sort of work. The problem is now that it is going to the wrong subdomain. But if I switch the names or requirements, both subdomains route to the same bundle again. Is it possibly due to having multiple subdomains, IE (staging.sub1.site.com and staging.sub1.site.com)? Pastebin of routing.yml

1

1 Answers

0
votes

In routing the first match wins. So you main bundle may be imported before your specific bundle. Either move the my_bundle import to first or set a host: %main_host% to all other imports.