If you do need to get the base URL in CakePHP3 , you can use the
Router class://without http://website.domain.com/app
echo Router::url('/') //-> /my_app
//with http://website.domain.com/app
echo Router::url('/', true) //-> http://site.domain.com/my_app