How to configure multiple subdomain names under symfony 2
为情所困
为情所困 2017-05-16 16:45:13
0
1
357

How to configure multiple subdomain names under symfony 2 Main domain name www.xxx.com xxxcontroller I only allow access to the test.xxx.com domain name. How is this configured?

为情所困
为情所困

reply all (1)
大家讲道理

Only supported by 2.2 and above:

(1) Individually assigned to a certain action:

some_routing: path: /some_path host: "{host}.example.com" defaults: { _controller: SomeDemoBundle:Some:exampleAction }

(2) Assign batches to a Controller

First use annotations in this Controller or write yaml routing for it, then import this group of routing, and uniformly restrict the host:

some_routing: resource: "@SomeDemoBundle/Resources/config/routing.yml" host: "host.example.com"
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!