Use sub-url to identify the different server

nevereturn01 nginx-forum at forum.nginx.org
Mon Jan 14 03:18:06 UTC 2019


Hi Francis,

Thanks for your reply.

Since I'm not in the website develop team, I cannot let them change the url
structure:(

Now, I'm tring to use URL rewrite.
I've tried the following:
==============================
location /site1 {
             rewrite ^/site1/(.*) /$1 break;
             proxy_pass https://10.1.1.1;
==============================
However, it didn't work and I got a Http 404 error.

If URL rewrite can help in this scenario, is there anything wrong with my
rewrite rule?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,282615,282690#msg-282690



More information about the nginx mailing list