Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

tell nginx to stay inside same location? (3 replies)

$
0
0
Hello,

is that possible to tell nginx to stay inside the same location after
rewrite rule is done?

i.e. I have:

location /njs/ {
proxy_pass http://localhost:5501;
.......
}

now, if i need to cut off /njs/ part, i added the following:
location /njs/ {
rewrite /njs(.*) $1;
proxy_pass http://localhost:5501;
...........
}

but, that doesn't work, because my uri has changed and nginx goes to the
default location, which I don't need.

what could I do in this situation?

--
With best regards,
Gregory Edigarov

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>