S
S
Sergey Ozeransky2016-10-10 19:16:31
Django
Sergey Ozeransky, 2016-10-10 19:16:31

Subdomains for language (django)?

Good afternoon.
Used by i18n_patterns
language versions of the site are available at:
site.ru/kk/
site.ru/ru/
site.ru/en/
How to make language versions available at:
kk.site.ru
ru.site.ru
en .site.ru

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2016-10-10
@deliro

server {
    server_name "~^(?<sub>\w+)*\.(?<domain>.*)$";
    proxy_pass http://$domain/$sub/$request_uri;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question