Jackson Tong Jackson Tong - 5 years ago 904
PHP Question

How to set the default controller in yii2

I have

UserControler
and I run it in virtual server http://basic.com/index.php?r=user/index. How can I set up
UserController
and action
index
to be the default when I go to http://basic.com

Answer Source

Did you try in your config:

'defaultRoute' => 'user/index'

Default Controller

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download