0

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

OK thank you very much for your reply, how can I change the the VirtualHost of my server? means I have the Cpanel access of the server, in which process can I change this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.