title: Is there a precedence urlManager rule?
body: <p>In my Yii test app, I have 2 types of URL. Example as below:-</p>
  
  <pre><code>http://localhost/testapp/index.php?r=post/view&amp;id=1&amp;slug=maximizing-profit
  http://localhost/testapp/index.php?r=category/view&amp;slug=investment
  </code></pre>
  
  <p>The first URL have 2 parameter; <strong><code>id</code></strong> and <strong><code>slug</code></strong> while second parameter only has <strong><code>slug</code></strong> parameter</p>
  
  <p>And in my urlManager, I have 2 rules</p>
  
  <pre><code>&lt;controller:\w+&gt;/&lt;action:\w+&gt;/&lt;slug:[a-zA-Z0-9-]+&gt;/' =&gt; '&lt;controller&gt;/&lt;action&gt;
  &lt;controller:\w+&gt;/&lt;action:\w+&gt;/&lt;id:\d+&gt;/&lt;slug:[a-zA-Z0-9-]+&gt;/' =&gt; '&lt;controller&gt;/&lt;action&gt;
  </code></pre>
  
  <p>With this rule, my first URL seems to be malformed whereby it'll be shown as</p>
  
  <pre><code>http://localhost/testapp/post/view/maximizing-profit?id=1
  </code></pre>
  
  <p>The second URL on the other hands displayed fine</p>
  
  <pre><code>http://localhost/testapp/category/view/investment
  </code></pre>
  
  <p>Is there a rule precedence in urlManager that we should follow?</p>