title: How to get clean urls in yii2 like ``post/100``
body: <p>I am quoting the guide:</p>
  
  <p>Depending on the urlManager configuration, the created URL may look like one of the following (or other format). And if the created URL is requested later, it will still be parsed back into the original route and query parameter value.</p>
  
  <pre><code>/index.php?r=post/view&amp;id=100  
  /index.php/post/100  
  /posts/100  
  </code></pre>
  
  <p>I am interested in third option or second without index.php. But how can I get it ? 
  I have .htaccess that is removing index.php ( I may need something for nginx, but do not know what and how, I have never used it).
  And I have pretty url set:</p>
  
  <pre><code>'urlManager' =&gt; [
      'enablePrettyUrl' =&gt; true,
      'showScriptName' =&gt; false,
  ],
  </code></pre>
  
  <p>what is next ?</p>
  
  <p>I have asked <a href="http://www.yiiframework.com/forum/index.php/topic/61028-how-to-get-clean-urls/" rel="nofollow">the same question</a> on yii2 forum, but I got no answer :(</p>