Maxim Dounin
August 08, 2012 11:40AM
Hello!

On Wed, Aug 08, 2012 at 11:04:25AM -0400, i0n wrote:

> Hi everyone.
>
> 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=1234/more/stuff/topicid=1234
> to be sent to
> http://nginxrouting_destination.local/itemid=1234topicid=1234 returning
> the headers from the new location

Use proxy_pass. See http://nginx.org/r/proxy_pass for details.

Maxm Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxying/redirecting after request has been rewritten

i0n August 08, 2012 11:04AM

Re: proxying/redirecting after request has been rewritten

Maxim Dounin August 08, 2012 11:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 197
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