title: Yii2 - Wrong homeUrl when setting baseUrl in urlManager
body: <p>I have a site is in a "web" subfolder, that is hidden with .htaccess so that people accessing <a href="http://www.example.com" rel="nofollow">http://www.example.com</a> gets served with <a href="http://www.example.com/web/index.php" rel="nofollow">http://www.example.com/web/index.php</a> .</p>
  
  <p>To set this behaviour and prevent Yii2 from generating links with the "web" folder, I have set "baseUrl" to "/" in the urlManager.</p>
  
  <p>Now all the pages are served right, and all the links are created correctly, but the Yii::$app->homeUrl variable has an incorrect value "<strong>//</strong>" when it should be "<strong>/</strong>", so it creates problems with login/logout.</p>
  
  <p>If i remove the baseUrl it works correctly, but adding the "web" parent folder to all urls.<br>
  What am I doing wrong?</p>