Skip to content

Commit 29c2bec

Browse files
committed
Tweak
1 parent c1d1df6 commit 29c2bec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

controller.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ and ``redirect()`` methods::
144144
// return new RedirectResponse($this->generateUrl('homepage'));
145145

146146
// does a permanent HTTP 301 redirect
147+
return $this->redirectToRoute('homepage', [], 301);
148+
// if you prefer, you can use PHP constants instead of hardcoded numbers
147149
return $this->redirectToRoute('homepage', [], Response::HTTP_MOVED_PERMANENTLY);
148150

149151
// redirect to a route with parameters

0 commit comments

Comments
 (0)