createUrl return getUrl (current page url ) ??? on MassVhost

Hi all

I have a very strange and kind of bloking behavior

While deploying our site on a MassVhost

if on Url :

a simple Yii:app()->createUrl(’/’) returns instead of

the strange thing about this is that it works fine locally

any idea is welcome ?

below snippet from our VHost Config maybe can help:

 VirtualDocumentRoot /pathto/www/%0

RewriteEngine on

 RewriteBase /%0

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond $1 !^(index\.php|assets|robots\.txt)

RewriteRule ^(.*)$ /index.php/$1 [PT,L,QSA]

That’s not how you link to the homepage.

What’s happening is that the slash is being stripped off the route, so the route becomes “” which createUrl() turns into the route of the current controller



and add a URL rule in your main config:

"urlManager" => array(

    "rules" => array(

        "/" => "site/index"



Thanks for the explanation.