Friendly URL with params 404

Hello, I have an issue that I cannot figure out.

When I use a friendly url with only a controller and action it works fine. If I add any params to the url it breaks and I get a 404 (from Yii). The URL works if I use standard url param formatting.

http://a.com/site/index | works

http://a.com/site/index/id/1 | does not work

http://a.com/site/index?id=1 | works

Yii Config




'urlManager' => [

                    'class' => 'yii\web\UrlManager',

                    'enablePrettyUrl' => true,

                    'showScriptName' => false,

                    'enableStrictParsing'=>false,

                ],



httpd.conf




<Directory /apps/yii/webroot>

    Options Indexes FollowSymLinks

    AllowOverride None

    Require all granted

    RewriteEngine on

    # if a directory or a file exists, use it directly

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule . index.php

</Directory>



I have Yii1.1 running on the same devel server and it works fine.

Thanks in advance!

I had the same problem, we need to create rules

see yiiframework.com/doc-2.0/guide-runtime-routing.html#creating-rule-classes