Answer the question
In order to leave comments, you need to log in
Why don't autosubdomains work in YII2?
The hosting has a DNS setting *.domain.com with type A, which refers to the main IP of the site.
When you try to enter any subdomain of the example.domain.com type, the domain.com site opens (the url does not change, there is a subdomain there).
The following rule is written in the project config in URLManager:
'http://photo.domain.com' => 'photo/default/index',
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question