I am using subdomain as my modules like
http://admin.lvh.me -> will point to admin module
http://tracker.lvh.me -> will point to tracker module
and so forth
My URL cofiguration looks like this
'urlManager' => array
(
'urlFormat' => 'path',
'showScriptName' => false,
//'useStrictParsing'=>true,
'rules' => array
(
/*Start Custom Routes*/
'http://lvh.me/' => 'static/default/index',
'http://lvh.me/contact.html' => 'static/default/contact',
'http://lvh.me/faq.html' => array('static/default/page','defaultParams' => array('view'=> 'faq')),
'https://<tracker:\w+>.lvh.me/click/<bannerCode:\w+>/<affiliateCode:\w+>' => 'tracker/click/index',
'http://<tracker:\w+>.lvh.me/click/<bannerCode:\w+>/<affiliateCode:\w+>' => 'tracker/click/index',
'http://admin.lvh.me' => 'admin/default/index',
'http://admin.lvh.me/login' => 'admin/default/login',
'http://admin.lvh.me/logout' => 'admin/default/logout',
'http://admin.lvh.me/admin/logout' => 'admin/default/logout',
'http://<module:\w+>.lvh.me/<controller:\w+>/<action:\w+>' => '<module>/<controller>/<action>',
'http://<module:\w+>.lvh.me/<controller:\w+>/<action:\w+>/<id:\d+>' => '<module>/<controller>/<action>',
'http://<module:\w+>.lvh.me/<controller:\w+>/<action:\w+>/' => '<module>/<controller>/<action>',
/*End Custom Routes*/
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
),
Now from the admin module I am trying to create absolute URL like
https://tracker.lvh.me/click/acode/bcode?subid=test&linkid=test
I tried this and many other combination but it is not working
echo $this->createAbsoluteUrl
(
'tracker/click/acode/bcode',
array('subid' => 'test', 'link' => 'test'),
'https'
);
//Produces https://admin.lvh.me/admin/tracker/click/acode/bcode/subid/test/link/test
echo $this->createAbsoluteUrl
(
'/tracker/click/index/',
array('subid' => 'test', 'link' => 'test'),
'https'
);
//Produces http://tracker.lvh.me/click/index?subid=test&link=test
None of the combinations are working. Any hint or help…please