@@ -43,8 +43,8 @@ Changing the Default Page
43
43
~~~~~~~~~~~~~~~~~~~~~~~~~
44
44
45
45
First, the default page can be set (i.e. the page the user is redirected to
46
- if no previous page was stored in the session). To set it to `` /admin `` use
47
- the following config:
46
+ if no previous page was stored in the session). To set it to the
47
+ `` default_security_target `` route use the following config:
48
48
49
49
.. configuration-block ::
50
50
@@ -56,15 +56,15 @@ the following config:
56
56
main :
57
57
form_login :
58
58
# ...
59
- default_target_path : /admin
59
+ default_target_path : default_security_target
60
60
61
61
.. code-block :: xml
62
62
63
63
<!-- app/config/security.xml -->
64
64
<config >
65
65
<firewall >
66
66
<form-login
67
- default_target_path =" /admin "
67
+ default_target_path =" default_security_target "
68
68
/>
69
69
</firewall >
70
70
</config >
@@ -79,13 +79,14 @@ the following config:
79
79
80
80
'form_login' => array(
81
81
// ...
82
- 'default_target_path' => '/admin ',
82
+ 'default_target_path' => 'default_security_target ',
83
83
),
84
84
),
85
85
),
86
86
));
87
87
88
- Now, when no URL is set in the session, users will be sent to ``/admin ``.
88
+ Now, when no URL is set in the session, users will be sent to the
89
+ ``default_security_target `` route.
89
90
90
91
Always Redirect to the Default Page
91
92
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -276,8 +277,8 @@ Redirecting on Login Failure
276
277
In addition to redirecting the user after a successful login, you can also set
277
278
the URL that the user should be redirected to after a failed login (e.g. an
278
279
invalid username or password was submitted). By default, the user is redirected
279
- back to the login form itself. You can set this to a different URL with the
280
- following config:
280
+ back to the login form itself. You can set this to a different route (e.g.
281
+ `` login_failure ``) with the following config:
281
282
282
283
.. configuration-block ::
283
284
@@ -289,7 +290,7 @@ following config:
289
290
main :
290
291
form_login :
291
292
# ...
292
- failure_path : / login_failure
293
+ failure_path : login_failure
293
294
294
295
.. code-block :: xml
295
296
@@ -312,7 +313,7 @@ following config:
312
313
313
314
'form_login' => array(
314
315
// ...
315
- 'failure_path' => login_failure,
316
+ 'failure_path' => ' login_failure' ,
316
317
),
317
318
),
318
319
),
0 commit comments