I want to reassign the main page

'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ 'advanced' => 'advanced/backend/controllers/calculator/index' ], ], 

Rules do not work. How can I override?

    2 answers 2

      'urlManager' => [ ... 'rules' => [ '' => 'calculator/index', // Контроллер/экшн ], ], 

      If you want all requests to the site.ru or site.ru/ page to go to a specific controller, then write this way

       'urlManager' => [ 'rules' => [ '/' => 'calculator/index', // Контроллер/экшн ], ], 

      and there is also a default router, you can change it and don’t touch the rules above

       'defaultRoute' => 'main/index',