Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9c30509

Browse filesBrowse files
committed
The host parameter has to be in defaults, not requirements
1 parent 876994a commit 9c30509
Copy full SHA for 9c30509

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎components/routing/hostname_pattern.rst

Copy file name to clipboardExpand all lines: components/routing/hostname_pattern.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ instance, if you want to match both ``m.example.com`` and
194194
mobile_homepage:
195195
path: /
196196
host: "m.{domain}"
197-
defaults: { _controller: AcmeDemoBundle:Main:mobileHomepage }
198-
requirements:
197+
defaults:
198+
_controller: AcmeDemoBundle:Main:mobileHomepage
199199
domain: "%domain%"
200200
201201
homepage:
@@ -212,7 +212,7 @@ instance, if you want to match both ``m.example.com`` and
212212
213213
<route id="mobile_homepage" path="/" host="m.example.com">
214214
<default key="_controller">AcmeDemoBundle:Main:mobileHomepage</default>
215-
<requirement key="domain">%domain%</requirement>
215+
<default key="domain">%domain%</requirement>
216216
</route>
217217
218218
<route id="homepage" path="/">
@@ -228,8 +228,8 @@ instance, if you want to match both ``m.example.com`` and
228228
$collection = new RouteCollection();
229229
$collection->add('mobile_homepage', new Route('/', array(
230230
'_controller' => 'AcmeDemoBundle:Main:mobileHomepage',
231-
), array(
232231
'domain' => '%domain%',
232+
), array(
233233
), array(), 'm.{domain}'));
234234
235235
$collection->add('homepage', new Route('/', array(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.