Skip to content

Conditional routing by multiple hosts #9373

@tak-amboss

Description

@tak-amboss

This is related to #6848 and #5424. I am trying to use the host matching for changeing my routing resource by domain.

test:
    resource: "routing.yml"
    host:     "my.first.domain"

test2:
    resource: "routing.yml"
    host:     "any.other.domain"

This routing works well for "any.other.domain" but calling by "my.first.domain" I get a NotFoundHttpException. If I change the order of my entries to:

test2:
    resource: "routing.yml"
    host:     "any.other.domain"

test:
    resource: "routing.yml"
    host:     "my.first.domain"

it works well for "my.first.domain" but "any.other.domain" is broken now. Is there a way to get around this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions