Nginx - Rewrite the request_uri before uwsgi_pass
I have a Nginx vhost than is configured as such: ... location /one { include uwsgi_params; uwsgi_pass unix:///.../one.sock; } location /two { include uwsgi_params; uwsgi_pass unix:///.../two.sock } ... This is a simplified configuration of course When I request /one/something I would like my Python script to receive /something as request_uri . I'm using BottlePy but would like this to be handled by Nginx and not in my Python code. Can I do something like uwsgi_param REQUEST_URI replace($request_uri, '^/one', '') ? Edit Here is the request from my Python code: [pid: 30052|app: 0|req: 1/1] ()