A
A
Alex_flex2016-03-27 22:37:31
Yii
Alex_flex, 2016-03-27 22:37:31

How to redirect yii2 language url?

Hello. I met a problem with the multilanguage url yii2 I did
everything according to this article https://habrahabr.ru/post/226931/
But the task is to redirect the language url to the subdomain
That is, instead of the result (at the moment)

example.com/ru
was -
ru.example.com

nginx is configured for subdomains.
Also in the rules urlmanager indicated
'http://<lang:\w+>.example.com/<action:\w+>' => 'http://<lang>.example.com/<action>'

Answer the question

In order to leave comments, you need to log in

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

I like this solution https://github.com/codemix/yii2-localeurls

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question