class RedirectController implements ContainerAwareInterface
Redirects a request to another URL.
Response | redirectAction(Request $request, string $route, bool $permanent = false, bool|array $ignoreAttributes = false) Redirects to another route with the given name. | |
Response | urlRedirectAction(Request $request, string $path, bool $permanent = false, string|null $scheme = null, int|null $httpPort = null, int|null $httpsPort = null) Redirects to a URL. |
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.
Redirects to a URL.
The response status code is 302 if the permanent parameter is false (default), and 301 if the redirection is permanent.
In case the path is empty, the status code will be 404 when permanent is false and 410 otherwise.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.html