hosting subdomain points to folder

Hi

I have deployed the basic sample yii app in to the sub domain ( test.mydomain.com ). Internally test.mydomain.com points to the folder in the hosting server say ‘/root/[color="#FF0000"]test[/color]’

After the deployment, i can see all the css files point to the URL test.mydomin.com/test/css/main.css

How can i configure ‘Yii::app()->request->baseUrl;’, to point directly to my subdomain.

Appreciate your time

Varadhan

Why do you need test subfolder in end of your base url?

test.mydomin.com/test/css/main.css

This will look for main.css in folder /root/test/test/css/

As I know Yii::app()->request->baseUrl cannot be changed since application located in folder cannot point to other folder…

So, there is two ways:

  1. Put the application in test folder (/root/test/test)

  2. Use old application folder, but fix the link to css file

Hope this helps

Hi Thanks for the details,

But it is not only for the css files, all the links in my site pre-pended with the folder name ‘test’

‘test’ is nothing but the folder in my hosting under root. and i have copied my sample application to that folder and pointing the test.mydomain.com subdomain to that folder.

I hope i am missing some configuration for these kind of subdomain setup in yii

It would be great if some one get me the solution for this issue

Appreciate your time. Thanks

Yii::app()->request->baseUrl cannot be modified. Maybe you can just define a variable in your index file like :




define('SOME_VARIABLE','/root/test');



or use setPathOfAlias()