Rituparna
Rituparna

Reputation: 43

module and subdomain for YII framework

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',
        'rules'=>array(
            '<controller:\w+>/<id:\d+>'=>'<controller>/view',
            '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
            '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
            'http://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.

Upvotes: 0

Views: 2384

Answers (1)

marcovtwout
marcovtwout

Reputation: 5269

Before Yii can handle that request, your server needs to be properly configured. Basically, you need to edit your DNS entries and your Apache config.

http://httpd.apache.org/docs/2.0/vhosts/examples.html http://content.websitegear.com/article/subdomain_setup.htm

Upvotes: 1

Related Questions