title: problems when hiding the 'web' folder from the url in YII2 basic application
body: <p>The YII2 basic app is installed under localhost in 'ims' folder.The links are like </p>
  
  <p><a href="http://192.168.0.99/ims/web/" rel="nofollow">http://192.168.0.99/ims/web/</a> (homepage)</p>
  
  <p><a href="http://192.168.0.99/ims/web/index.php?r=site%2Fabout" rel="nofollow">http://192.168.0.99/ims/web/index.php?r=site%2Fabout</a> (about us page)</p>
  
  <p>So far what i have done is.</p>
  
  <p>1) in web/.htaccess file</p>
  
  <pre><code>Options +FollowSymLinks
  IndexIgnore */*
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . index.php
  </code></pre>
  
  <p>2) in root .htaccess </p>
  
  <pre><code>Options -Indexes
  RewriteEngine on
  RewriteRule ^(.*)$ web/$1 [L]
  </code></pre>
  
  <p>3) In config/web.php</p>
  
  <pre><code>'components' =&gt; [
          'urlManager' =&gt; [
              'class' =&gt; 'yii\web\UrlManager',
              'enablePrettyUrl' =&gt; true,
              'showScriptName'  =&gt; false,
              'baseUrl' =&gt; '/',
          ],
  </code></pre>
  
  <p>This fixes the following things:</p>
  
  <p>1) Links are SEO friendly now</p>
  
  <p>2) index.php does not show now in url</p>
  
  <p>3) The homepage can be accessed with <a href="http://192.168.0.99/ims/" rel="nofollow">http://192.168.0.99/ims/</a></p>
  
  <p>Issue:-
  The about , contact &amp; login links now change to </p>
  
  <p><a href="http://192.168.0.99/site/about" rel="nofollow">http://192.168.0.99/site/about</a></p>
  
  <p><a href="http://192.168.0.99/site/contact" rel="nofollow">http://192.168.0.99/site/contact</a></p>
  
  <p><a href="http://192.168.0.99/site/login" rel="nofollow">http://192.168.0.99/site/login</a></p>
  
  <p>It misses the base folder name in the url 'ims'. Any suggestions or ideas regarding this ?</p>
  
  <p>Note:- I do not wish to use the Apache configuration to achieve this and also i do not wish to move the contents of web folder outside.
  I wish to hide the 'web' from the url without changing the structure of the YII2 basic application.</p>