title: Yii2 urlmanager rules for pretty urls fails
body: <p>I have the following url manager path</p>
  
  <pre><code>        'urlManager' =&gt; [
          'enablePrettyUrl' =&gt; true,
          'showScriptName' =&gt; false,
          'rules' =&gt; [
              '&lt;controller:(\w|-)+&gt;/' =&gt; 'site/index',
              '&lt;module:api\w+&gt;/&lt;controller:\w+&gt;/&lt;action:(\w|-)+&gt;' =&gt; '&lt;module&gt;/&lt;controller&gt;/&lt;action&gt;',
           ],
      ]
  </code></pre>
  
  <p>What am looking for is all urls not rendered via api module paths to run via site/index but all other paths having api/* to be executed via module paths.</p>
  
  <p>The above works for urls like /login, /auth  but when i run urls like </p>
  
  <pre><code>/administrative/uom 
  </code></pre>
  
  <p>It fails</p>
  
  <p>SO basically i want all urls to be redirrected via <code>site/index</code> but all urls having api as the prefix like <code>api/auth/login</code> to be run via their respective controllers.
  I have added an api module which should handle this.</p>
  
  <p>What else do i need to add to make this work?</p>