atom feed4 messages in ru.sysoev.nginxRe: Redirect based on header value.
FromSent OnAttachments
zestriddleNov 18, 2009 12:42 am 
Nick PearsonNov 18, 2009 8:26 pm 
zestriddleNov 19, 2009 1:01 am 
Igor SysoevNov 19, 2009 1:13 am 
Subject:Re: Redirect based on header value.
From:Igor Sysoev (is@rambler-co.ru)
Date:Nov 19, 2009 1:13:47 am
List:ru.sysoev.nginx

On Thu, Nov 19, 2009 at 04:01:44AM -0500, zestriddle wrote:

Thanks :), but I still need one more thing to make it usable. This comparison
$http_my_header ~ (\d+) must work on concrete values from file, namely

In file called header_value.file I would like to have

header_value1 header_value2 header_value3

and comparison $http_my_header ~ (\d+) should check whether any value from
header_value.file is in $http_my_header

http {

map $http_my_header $prefix { default ""; 123 /123; abc /abc; ... };

server { location / { proxy_pass http://s1$prefix$request_uri; }