title: How to create Pretty/Clean url using yii2 on nginx server
body: <p>I am using basic template of yii2.0.3 on a <strong>nginx</strong> server and have a demo theme under web/theme/demo.</p>
  
  <p>I have config the web.php as below for the theme.</p>
  
  <pre><code>'components' =&gt; [
      'view' =&gt; [
      'theme' =&gt; [
      'pathMap' =&gt; ['@app/views' =&gt; 'theme/demo'],
      'baseUrl'   =&gt; 'theme/demo'
      ]
  ],
  </code></pre>
  
  <p>Everything is working fine.I want to remove the <strong><em>web/index.php</em></strong> from the url of the home page as well as from other pages too.
  As nginx does not support <strong>.htaccess</strong> i have put simple the below rules on the <strong>web.php</strong> file</p>
  
  <pre><code>'urlManager' =&gt; [
  'enablePrettyUrl' =&gt; true,
  'showScriptName' =&gt; false,
  'enableStrictParsing' =&gt; false,
  'rules' =&gt; [],
      ],
  </code></pre>
  
  <p>I have not put anything inside '<em>rules</em>'..so clean url may not working properly.
  Please help me to remove <strong>/web/</strong> from each page of the template.</p>