E
E
EvgMul2017-04-04 13:55:16
Yii
EvgMul, 2017-04-04 13:55:16

How to correctly write a routing rule in Yii2?

Hello, I need the user who came to my site to be redirected to the module display.
I'm trying to write the following:

'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'enableStrictParsing' => false,
            'rules' => [
                '/' => 'frontend/web/site-front',
            ],
        ],

Gives 404 error.
Can you please tell me how to correctly configure the routing for my requirement?
Thanks in advance to all who respond.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LittleFatNinja, 2017-04-04
@EvgMul

'/' => '<module>/<controller>/<action>',

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question