Proposal: adding "appUrl" to Application Config

Hello.

I have conquered the need to do something like this:

File: <app>/protected/config/main.php:



  'appUrl' => 'http://localhost/myapp/',


This is the absolute path, where my Application resides.

After that, i can use it to set a path relative from this one:

$image = Yii:app()->config['appUrl'] . "/images/myimage.png";

At the moment it raises an Exception in framework/base/CModule.php(404)

because there is no private Variable appUrl, but i fixed this for my purpose.

Does it make sense to apply this "feature" in future Yii Versions?

What you are saying isn't this?

Yii::app()->request->baseUrl

baseUrl seems to be the name of the folder, where my application is placed.

I wanted to deploy the whole URL of the Web-Server where my Project is placed, so i can move it whereever i want and just need to modify one line, instead of hundred places scattered around my source code.

so, for example: http://www.yiiframework.com/myapp

baseUrl would be: myapp

appUrl would be: http://www.yiiframework.com/myapp/