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?
大家讲道理2017-05-16 16:47:13
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"