Yii2: Remove controller from URL
问题 I am using the advanced template. I created all my actions on the SiteController, so all my urls are domain.com/site/something, and I need to remove the word "site" from the url so it will be domain.com/something. I tried the following rules based on this question 'urlManager' => [ 'class' => 'yii\web\UrlManager', 'showScriptName' => false, 'enablePrettyUrl' => true, 'rules' => array( '/<action:\w+>/<id:\d+>' => 'site/<action>', '/<action:\w+>' => 'site/<action>', '/noticia/<slug>' => 'site