8000 Subdomain with dynamic hosts · Issue #1242 · FriendsOfSymfony/FOSUserBundle · GitHub 8000
[go: up one dir, main page]

Skip to content
Subdomain with dynamic hosts #1242
@gforcesbarry

Description

@gforcesbarry

Hi,

The site I am building has the following URLS set up

www.domain.com = holding site
sales.domain.com = sales area
admin.domain.com = main site admin area
*.domain.com = customer area with individual admin ( cust1.domain.com cust2.domain.com )

All of the routes work fine and go to the correct bundle. FOSUserbundle however thows an exception when it tries to create the following:

path('fos_user_security_login') within \vendor\friendsofsymfony\user-bundle\FOS\UserBundle\Resources\views\layout.html.twig

Looking through the code I believe it will also do it path("fos_user_security_check") within \vendor\friendsofsymfony\user-bundle\FOS\UserBundle\Resources\views\Security\login.html.twig

Any help would be appreciated. Below is my default routing.yml file.

sales:
resource: "@SalesBundle/Resources/config/routing.yml"
prefix: /
host: "{subdomain}{domain}"
requirements:
subdomain: (sales.)
domain: %base_host%

admin:
resource: "@AdminBundle/Resources/config/routing.yml"
prefix: /
host: "{subdomain}{domain}"
requirements:
subdomain: (admin.)?
domain: %base_host%

holding:
resource: "@HoldingBundle/Resources/config/routing.yml"
prefix: /
host: "{subdomain}{domain}"
requirements:
subdomain: (www.)?
domain: %base_host%

subsites:
resource: "@SubdomainBundle/Resources/config/routing.yml"
prefix: /
host: "{subdomain}{domain}"
requirements:
subdomain: ([a-zA-Z.]+)(?<!www.)(?<!admin.)(?<!sales.)
domain: %base_host%

_user_bundle:
resource: "@UserBundle/Resources/config/routing.yml"
prefix: /
host: '{subdomain}{domain}'
requirements:
subdomain: ([a-zA-Z.]+)(?<!www.)(?<!admin.)(?<!sales.)
domain: %base_host%

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

      0