NginX proxying/redirecting after request has been rewritten

view full story

http://serverfault.com – I'm trying to get Nginx to run some Regex's on requests and send them to another server block, returning the response headers from the second server block. At the moment I get a 302 response status, how do I get the headers from the second server block? So as an example, I would like a request like: http://nginxrouting.local/some/stuff/that/needs/to/be/removed/itemid=123... to be sent to http://nginxrouting_destination.local/itemid=1234topicid=1234 returning the headers from the new location The server blocks look like this: server { server_name nginxrouting.local; (HowTos)