By default, all routes with yii-2 start from the index.php file and are set with the "r = {controller} / {action}" parameter.

Is it possible to change the addressing, if the initial page is, for example: admin.php.

The task is: there should be two separate designs and a different security policy for the admin and the main part of the site, some of the actions are the same (list of hotel rooms: 1 - grid with the ability to edit, 2 - page with the ability to book rooms).

    1 answer 1

    Good morning.

    Which template yii2 do you use? Basic or advanced?

    In advanced, there is already a split into admin and user parts. If basic, separate modules are created, for example, the admin module. With rbac, access rights are delimited.

    Is it possible to change the addressing, if the initial page is, for example: admin.php.

    What for? What exactly do you want to achieve? Replace the name of the input script? Then again, why?

    Create a different design for different parts of the site is not difficult.

    some action are the same

    In the sense of? Show an example of your actions.

    In general, little can be understood from your question. Refine and complete the question.

    • the main problem is solved, thanks, the separation of the admin and front part is what you need. What is the best way to change the template yii2 to advanced? - Apvaris 4:06 pm
    • Where exactly, what exactly? Connect the design? - user216615 4:52 pm