title: Yii2 Clean URLs & Action Parameters
body: <p>I've enabled clean URLs on my Yii2 application, but I can't seem to get arguments to pass to the action.</p>
  
  <p>I expect this:</p>
  
  <blockquote>
    <p>localhost/app/web/a/b/c/d</p>
  </blockquote>
  
  <p>To map to the following:</p>
  
  <blockquote>
    <p>AController->actionB($c, $d)</p>
  </blockquote>
  
  <p>It's not happening.</p>
  
  <p>Here's my .htaccess:</p>
  
  <pre><code>RewriteEngine on
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d 
  
  RewriteRule . index.php
  </code></pre>
  
  <p>The relevant part of my web.php:</p>
  
  <pre><code>'urlManager' =&gt; [
                  'class' =&gt; 'yii\web\UrlManager',
                  'enablePrettyUrl' =&gt; true,
                  'showScriptName' =&gt; false,
                  'rules' =&gt; array(
                          '&lt;controller:\w+&gt;/&lt;id:\d+&gt;' =&gt; '&lt;controller&gt;/view',
                      '&lt;controller:\w+&gt;/&lt;action:\w+&gt;/&lt;id:\d+&gt;' =&gt; '&lt;controller&gt;/&lt;action&gt;',
                      '&lt;controller:\w+&gt;/&lt;action:\w+&gt;' =&gt; '&lt;controller&gt;/&lt;action&gt;',
                  ),
          ],
  </code></pre>