Default Controler In App And In Module

Hi, i wanted to ask how to change the default "site" controller used in yii2 to my own, also the same for modules where the default controller is "default"

i already tryed to use urlmanager, but setting ‘index’=>‘mycontroller/index’ makes the url index.php/index pointing to my controller

i want to change the controller of index.php direclly

any help on this?


The same applies to modules.

oh yes!!!

thank you!!

for clarification: the needed code is in config/web.php

$config = [

    'defaultRoute' => 'cuentas',