D
D
Dilik Pulatov2019-10-03 09:37:28
Nginx
Dilik Pulatov, 2019-10-03 09:37:28

How to rewrite a redirect in Nginx?

Hello!
The task is such
There is a site.com domain and languages ​​.. for example ru, en
if the user accesses the site.com link, then nginx should redirect to site.com/en/physical
and if it is not empty, that is, there is an nginx url after site.com should listen to localhost 3300
and now I have it like this

location / {
  	 client_max_body_size 200M;
    proxy_pass http://localhost:3300;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}

site on vue js...and on first load it for some reason redirects to url /en/physical after loading full page

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question