Where can I define the homeUrl

I want to make some check for homeUrl, with different condition show different homeUrl, so where can I define it, thx!

It seems like you can configure it in your main.php like this:




I’m not sure weather in main.php can use some params, If I want to use some condition to modify the homeUrl, now what I do: defined a method called homeUrl(), and then used where I want to use.

But thx for your reply!

You can also set it at runtime.

Yii::app()->homeUrl = 'http://example.com/';

Check out the API for CWebApplication.

You can also use