Http\Response::redirect

public redirect ([mixed $location], [mixed $externalRedirect], [mixed $statusCode])

Redirect by HTTP to another action or URL

//Using a string redirect (internal/external)
$response->redirect("posts/index");
$response->redirect("http://en.wikipedia.org", true);
$response->redirect("http://www.example.com/new-location", true, 301);

//Making a redirection based on a named route
$response->redirect(array(
    "for" => "index-lang",
    "lang" => "jp",
    "controller" => "index"
));
doc_Phalcon
2016-10-16 09:51:26
Comments
Leave a Comment

Please login to continue.