In cakephp we do not need to set hard coded relative paths.There are methods by calling which we can build the url dynamically.
To get the base url use
Router::fullBaseUrl(); => http://localhost //Output
To get the Application Url
Router::url(); =>/CakeApp/ //Output
To build complete URL of controller and method called: