I'm trying to Proxy Pass
/do/uploads.php?id=xxx
to /do/upload?id=xxx
in Nginx
Here is my try
location /do {
rewrite /do/uploads\.php /do/uploads$1 break;
proxy_pass http://domain/do;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
I found a solution. Here it is: