A
A
Alexey Eremin2017-07-11 06:43:23
Yii
Alexey Eremin, 2017-07-11 06:43:23

Yii2 - implementation of domain patterns?

Good day, please, who has already tried to implement a system for different domains, different templates on 1 YII2 engine, how to do this, please, an example of an implementation code or server settings.
I need to place on 1 engine a system that will have 1 template on the main domain, and another template on subdomain names. To process different controllers. Thanks ;-)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita, 2017-07-11
@bitver

This is what the Advanced template is for. Try to open the documentation, they say it helps.

M
Maxim Timofeev, 2017-07-11
@webinar

There are several options.
1. We look $_SERVER['SERVER_NAME']and, starting from it, set the theme.
2. each subdomain is a separate app, while everything is out of the box and so it
all depends on whether different configs are needed, etc. If only topics, then 1 option, if not only then 2nd.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question