D
D
Denis Goncharenko2018-11-04 16:26:40
Yii
Denis Goncharenko, 2018-11-04 16:26:40

How to set up routing in Yii2?

In addition to the main site, it is necessary that there are landing pages, simple static html pages, which will each be in their own folder in the web folder, as I understand it, these pages need access, how to set up routing for them?

rules' => [
        /* Signup */
        'signup' => 'auth/signup/signup',

        /* Authorization */
        '<_a:login|logout>' => 'auth/authorization/<_a>',
    ]

Here we set up routing for controllers, but what if I need to open not the controller, but the index.html file in a specific subfolder in the web folder.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2018-11-04
@kawabanga

Simple static pages will actually open, no routing is needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question