T
T
Tatiana Komarova2016-03-28 21:19:12
Yii
Tatiana Komarova, 2016-03-28 21:19:12

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',

But photo.domain.com also returns the main page, not the photo module page. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-03-28
@webinar

yiiframework.ru/forum/viewtopic.php?t=10102

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question