Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
Redirects to another route with the given name.
The response status code is 302 if the permanent parameter is false (default), and 301 if the redirection is permanent. In case the route name is empty, the status code will be 404 when permanent is false and 410 otherwise.
Signature
public function redirectAction(Request
$request,
[string
$route = false,
[Boolean
$permanent = false,
[Boolean|array
$ignoreAttributes = false]]] )
Parameters
$request
— Symfony\Component\HttpFoundation\Request- The request instance
$route
— string- The route name to redirect to
$permanent
— object- Whether the redirection is permanent
$ignoreAttributes
— object- Whether to ignore attributes or an array of attributes to ignore
Returns
- Response
- A Response instance