Skip to content

Kirby 6.0.0

ViewDocumentResponse::redirect()

Creates a redirect response, which will send the visitor to the given location.

ViewDocumentResponse::redirect(string $location = '/', int $code = 302, bool $inherit = false): ViewDocumentResponse

Parameters

Name Type Default Description
$location string '/'
$code int 302
$inherit bool false Keep the query and params of the current request (since 5.7.0)

Return type

Kirby\Panel\Response\ViewDocumentResponse

Parent class

Kirby\Panel\Response\ViewDocumentResponse inherited from Kirby\Http\Response