Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction
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.
Signature
public function urlRedirectAction(Request
$request,
[string
$path = false,
[Boolean
$permanent = false,
[string|null
$scheme = null,
[integer|null
$httpPort = null,
[integer|null
$httpsPort = null]]]]] )
Parameters
$request
— Symfony\Component\HttpFoundation\Request- The request instance
$path
— string- The absolute path or URL to redirect to
$permanent
— object- Whether the redirect is permanent or not
$scheme
— object- The URL scheme (null to keep the current one)
$httpPort
— object- The HTTP port (null to keep the current one for the same scheme or the configured port in the container)
$httpsPort
— object- The HTTPS port (null to keep the current one for the same scheme or the configured port in the container)
Returns
- Response
- A Response instance