Actually the whole question is a monolie to me from the controller in the backend part to make a redirect to the main page of the frontend and how to do it? Or do you have to make a redirect absolute address?

  • The documentation describes how to create links through an auxiliary urlManager: github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/… . And if you want to create an absolute link with the domain name, you can simply add the domain to the beginning. - cronfy
  • @cronfy is good and how can I put a rule there. Although I honestly don’t understand why I need it because I don’t want joint rules, and a redirect if the user does not follow those rules so that he wouldn’t throw him out. - Sergalas
  • one
    I believe that you can do the redirects yourself. In the redirect, you must pass Url. Url can be created using UrlManager. To create a frontend url, you take the frontend UrlManager and use the createAbsoluteUrl () method to create a link to the desired frontend route, for example, site / index. - cronfy
  • Or is your question how to redirect to yii2? - cronfy
  • one
    So you should already have a rule for the front page frontend. Do you have yii2 there too? Usually site/index . And about “is it not easier?” - so the easiest way is to simply register the necessary link with your hands and not suffer with urlmanager. - cronfy

0