title: Yii2 remove site/index from url
body: <p>I use the Yii2 framework and want to remove <code>site/index</code> from my URLs.</p>
  
  <p>Right now I have the following URL</p>
  
  <pre><code>example.com/site/index
  </code></pre>
  
  <p>but would like to change it to simple </p>
  
  <pre><code>example.com
  </code></pre>
  
  <p>I tried the following approach <a href="https://stackoverflow.com/questions/38272745/yii2-how-to-remove-site-index-and-page-parameter-from-url">Yii2 How to remove site/index and page parameter from url</a> but it doesn't work.</p>
  
  <p>Could you please suggest how it can be done?</p>