Asset Location

I have restructured my Yii 1.1 app as follows:

Web Server Document Root: /var/www/app_name

Yii Application: /var/www/app_name/my_app

Index File Link (soft): /var/www/app_name/index.php -> /var/www/app_name/my_app/index.php

Base Path in main.php is set to: ‘basePath’=>’/var/www/88flow/cashflow_app/protected’,

Now this all works fine except for the assets.

The assets are generated correctly in the folder: /var/www/app_name/my_app/assets/xxxx

However, the code that is generate to access the assets is:

<script type="text/javascript" src="/assets/cc2b51b0/jquery.js"></script>

<script type="text/javascript" src="/assets/cc2b51b0/jquery.yiiactiveform.js"></script>

The correct path should be /my_app/assets, not /assets.

So, does anyone have any ideas how to get the code to generate properly?

Try to set the assetManager->baseUrl -

something like this:

'assetManager' => arary(

   'basePath' => '/var/www/...',

   'baseUrl' => 'my_app/assets',


Maurizio, you are a champion! This solution worked perfectly. Thank you.