Welcome! Log In Create A New Profile

Advanced

Redirect based on header value.

November 18, 2009 03:42AM
Let assume that server called n1 is reverse proxy (SSL) for http server s1. Client c1 connects to n1 using given URL https://n1/index.html and in the end reads web page from /var/www/index.html on s1. What I want to do is to change URL sent to s1 depending on some header value sent by client. Namely, c1 connects to n1 with URL https://n1/index.html and with header "some_header=123" then n1 checks in some configuration file what to do if some_header has the value of 123 and changes the URL http://s1/123/index.html (as an example). I did the same thing on Apache using *.map files and RewriteRule how I can do the same thing in nginx ?
Subject Author Posted

Redirect based on header value.

zestriddle November 18, 2009 03:42AM

Re: Redirect based on header value.

Nick Pearson November 18, 2009 11:30PM

Re: Redirect based on header value.

zestriddle November 19, 2009 04:01AM

Re: Redirect based on header value.

Igor Sysoev November 19, 2009 04:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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