request, HTTP.
:
header("Location: example.com/simplephp.php");
:
$request->setHeader('Location', 'example.com/simplephp.php', true);
, , ..
An easy way to handle redirects without worrying about the details is through the Redirector action helper . You can use it even outside the controller, getting its static instance from Helper Broker.
Please note that even if shortened URLs work in almost all browsers, you should always provide the full URL for the location (including protocol and domain name) as specified in HTTP 1.1.
source
share