I have question. Is it possible to assign subdomain to module? For example admin.domain.com to admin module.
Page 1 of 1
Subdomain and Modules
#2
Posted 11 February 2010 - 02:26 PM
There is a feature called "Parameterizing Hostnames" (described on this pages). You can do:
So "admin/site/index" refers to the module "admin" with controller "site" and action "index".
'components' => array(
...
'urlManager' => array(
'rules' => array(
'http://admin.example.com' => 'admin/site/index',
'http://admin.example.com/login' => 'admin/site/login',
),
),
...
),
So "admin/site/index" refers to the module "admin" with controller "site" and action "index".
#3
Posted 12 February 2012 - 02:59 PM
Hi I am Ritu from India, I am using YII framework at one of my project and I am facing problem with Parameterizing Host Names, I have a module "ADMIN" and I want to display this as a subdomain within my domain, so I am setting rules like the following way from the protected/config/main.php:
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<controller:w+>/<id:d+>'=>'<controller>/view',
'<controller:w+>/<action:w+>/<id:d+>'=>'<controller>/<action>',
'<controller:w+>/<action:w+>'=>'<controller>/<action>',
'www.admin.moresoccerfun.com/login' => 'admin/default/index',
),
),
But when I am running the page: www.admin.moresoccerfun.com/login from the browser, it is showing "SERVER NOT FOUND". Please help me out from this problem.
Thanks and looking for your response.
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<controller:w+>/<id:d+>'=>'<controller>/view',
'<controller:w+>/<action:w+>/<id:d+>'=>'<controller>/<action>',
'<controller:w+>/<action:w+>'=>'<controller>/<action>',
'www.admin.moresoccerfun.com/login' => 'admin/default/index',
),
),
But when I am running the page: www.admin.moresoccerfun.com/login from the browser, it is showing "SERVER NOT FOUND". Please help me out from this problem.
Thanks and looking for your response.
#5
Posted 16 August 2012 - 06:09 AM
Hi I also experiencing the same thing. and not missing the http.
Please advice. Thanks
Please advice. Thanks
Share this topic:
Page 1 of 1

Help












