7 messages in ru.sysoev.nginxRe: Is there a way to emulate Squid's...
FromSent OnAttachments
Yusuf GoolamabbasJun 15, 2006 11:35 pm 
Igor SysoevJun 16, 2006 3:09 am 
Aleksandar LazicJun 16, 2006 6:28 am 
Igor SysoevJun 16, 2006 6:40 am 
Yusuf GoolamabbasJun 18, 2006 6:58 pm 
Yusuf GoolamabbasApr 12, 2009 6:14 pm 
Eden LiApr 13, 2009 8:51 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Is there a way to emulate Squid's redirector interface in reverse proxyActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Jun 16, 2006 6:40:26 am
List:ru.sysoev.nginx

On Fri, 16 Jun 2006, Aleksandar Lazic wrote:

On Fre 16.06.2006 14:09, Igor Sysoev wrote:

On Fri, 16 Jun 2006, Yusuf Goolamabbas wrote:

Squid has a mechanism by which incoming URL's can be passed to an external program to be rewritten and the reverse proxy subsequently calls out to the rewritten URL

http://wiki.squid-cache.org/SquidFaq/SquidRedirectors

Is there a way to emulate this from within nginx

No, nginx does not support such rewriting. What exact functionality do you need ?

But how about with the perl-module?

It's possible:

--------- http {

perl_set $new '

sub { my $r = shift; my $uri = $r->uri;

return "/one/" if $uri =~ /1/; return "/two/" if $uri =~ /2/; return "/three/"; }

';

server { rewrite ^ $new;

However, currently nginx could change URI only, it could not change the backend name.