In Cakephp routes.php, How to redirect to external url eg: http://blog.example.com
Router::connect('/blog','http://blog.example.com/');
In Cakephp routes.php, How to redirect to external url eg: http://blog.example.com
Router::connect('/blog','http://blog.example.com/');
This cannot be done with CakePHP. Well actually it could, but you'd better put this in your .htaccess/apache/nginx/whatever server you're using, this is where this kind of thing belongs.
If you really, really, REALLY can't do it that way, you can route /blog to a controller action that will simply redirect.
Config/routes.php
<?php
Router::redirect('/blog/*', 'http://blog.example.com', ['status' => 301]);
Edited with may comment