RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'controller/action/' => 'controller/action',
]
],