Hi Guys,
I follow this wiki (http://www.yiiframework.com/wiki/407/url-management-for-websites-with-secure-and-nonsecure-pages/) and it works great for one domain.
However, I have a .com and .ca domain pointing to the same code base. What do I do with the code below so that it works with both .com and .ca.
Yii::app()->createAbsoluteUrl(‘site/login’)
-
on .com domain gives https://example.com/site/login
-
on .ca domain also gives https://example.com/site/login. I want it to return https://example.ca/site/login
return array(
// ....
'components' => array(
'urlManager' => array(
'class' => 'UrlManager',
'urlFormat' => 'path',
'hostInfo' => 'http://example.com',
'secureHostInfo' => 'https://example.com',
'secureRoutes' => array(
'site/login', // site/login action
'site/signup', // site/signup action
'settings', // all actions of SettingsController
),
),
),
);