October 18, 2017 11:58AM
Also - our standardization is not the greatest, so I actually want to rewrite the entire URI, which is why I have ^/(.*) as the regex. However I don't think the $1 in the replacement string will still apply to the original URI. Would this work?

location ~* /v1/device/(.*)/ {
rewrite $uri /api/v1.0/download/$1 break;
proxy_pass http://api.domain.com;
}
Subject Author Posted

basic rewrite question

halfpastjohn October 18, 2017 11:39AM

Re: basic rewrite question

halfpastjohn October 18, 2017 11:58AM

Re: basic rewrite question

halfpastjohn October 18, 2017 12:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 234
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready