Redirect from View file in CakePHP3

To redirect from a CakePHP view file, use the Response object.

In your template.ctp:

$this->response->location(Router::url('/', true);

With the second parameter of Router::url set as true, a full URL will be built.