UrlManager not working with hidden folder

Good morning experts,

I developed a website on my local machine und put it in a folder called "restart". Now I uploaded the whole thing for live production. I used mod_rewrite to hide the folder "restart" by this:

RewriteCond %{HTTP_HOST} mydomain\.de$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} ^/blog

RewriteRule ^(.*?)$ /restart/$1 [QSA,L]

So far, that works well as my page is displayed directly when I call


instead of



Unfortunately the UrlManager is not able to resolve the route. I always got the index page displayed, or with strict parsing enabled an error. It seems to me, that Yii cannot resolve the route since it is missing the subfolder "restart".

I tried several thing that all had not been working so far:

  1. Trying to define absolute rules - not helping:










  1. Trying to set basePath in the config file manually to the Path without the subfolder - not working

  2. Trying to mod_rewrite directly to the "restart/index.php" instead to the folder "restart" - same story

Any clues?

Best Regards and many thanks in advance!


P.S. I had to change the URLs a bit since it is not allowed to use URLs within the first posts. But it should be clear what is meant

  • I think these rules should contains non-absolute paths but relative paths (without http:…mydomain.de/)

  • I think [-a-z]+ is ambigous, use \w+ or [a-zA-Z0-9]+ instead.

  • And "RewriteRule ^(.?)$", I’m not a so regex expert but i think .? will result of a selection of /restart/ and anything that follows