Class RedirectException
An exception subclass used by the routing layer to indicate that a route has resolved to a redirect.
The URL and status code are provided as constructor arguments.
throw new RedirectException('http://example.com/some/path', 301);
Namespace: Cake\Routing\Exception