Redirecting to the home page

Sometimes you’d like to create a link that will redirect your traffic to the homepage. For example, you have some partner web site that will drive traffic to a URL like: This way you’ll be able to track this link in the web site logs.

Just add the following line to your routes.php file:

[sourcecode language=’php’]
 Router::connect(‘/partnerName’, array(‘controller’ => ‘pages’, ‘action’ => ‘display’, ‘home’));

Related Posts