Answer the question
In order to leave comments, you need to log in
How to add language code to url in Nginx?
Hello!
The site is powered by Vue js(NuxtJS) in SSR mode.
The site is launched on port 3000 and through the proxies in Nginx I will listen to the port for the domain.
The site is multi-language. example url now site.com/en
So the task is this.
In Nginx, you need to implement it so that when you click on a link, for example: site.com
you need to redirect to, en.site.com
that is, the language code must be before the domain.
How can this be implemented?
And at the same time, you need validation for the language code .... let's say I have 2 languages RU and EN . You need Nginx to skip only these: en.site.com
andru.site.com
Answer the question
In order to leave comments, you need to log in
Try it.
https://github.com/giom/nginx_accept_language_module
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question