Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit836e3e6

Browse files
committed
minor#9314 [FrameworkBundle] feature: redirect query params too in RedirectController (Simperfit, javiereguiluz)
This PR was merged into the master branch.Discussion----------[FrameworkBundle] feature: redirect query params too in RedirectControllerAdding documentation for the redirectAction improvement.This needs the feature to be merged firstCommits-------ba5c343 Restored a removed character6c92c05 Reworded the new option explanation7210586 feature: redirect query params too in RedirectController
2 parents1abac5c +ba5c343 commit836e3e6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎routing/redirect_in_config.rst‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ action:
113113
controller:Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
114114
defaults:
115115
route:sonata_admin_dashboard
116+
# make a permanent redirection...
116117
permanent:true
118+
# ...and keep the original query string parameters
119+
keepQueryParams:true
117120
118121
..code-block::xml
119122
@@ -129,7 +132,10 @@ action:
129132
<routeid="admin"path="/wp-admin">
130133
<defaultkey="_controller">Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction</default>
131134
<defaultkey="route">sonata_admin_dashboard</default>
135+
<!-- make a permanent redirection...-->
132136
<defaultkey="permanent">true</default>
137+
<!-- ...and keep the original query string parameters-->
138+
<defaultkey="keepQueryParams">true</default>
133139
</route>
134140
</routes>
135141
@@ -145,7 +151,10 @@ action:
145151
$routes->add('admin', new Route('/wp-admin', array(
146152
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction',
147153
'route' => 'sonata_admin_dashboard',
154+
// make a permanent redirection...
148155
'permanent' => true,
156+
// ...and keep the original query string parameters
157+
'keepQueryParams' => true,
149158
)));
150159
151160
return $routes;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp