3 messages in ru.sysoev.nginxRe: Rewrite rule for reverse proxy
FromSent OnAttachments
ClaudeMay 11, 2009 8:58 pm 
Igor SysoevMay 11, 2009 11:23 pm 
ClaudeMay 12, 2009 5:00 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: Rewrite rule for reverse proxyActions...
From:Igor Sysoev (is@rambler-co.ru)
Date:May 11, 2009 11:23:23 pm
List:ru.sysoev.nginx

On Tue, May 12, 2009 at 03:58:31AM +0000, Claude wrote:

Trying to write a rewrite rule that will transform this url http://external_site.com/login?back_url=http%3A%2F%2Finternal_url%2F to this one http://external_site.com/login?back_url=http%3A%2F%2Fexternal_site.com%2F

I know I need to play with arguments and rewrite but I'm stuck.

Redirection rewrite capabilitires are very limited: they works with exact strings only, but you may try

proxy_redirect default;

proxy_redirect http://external_site.com/login?back_url=http%3A%2F%2Finternal_url%2F http://external_site.com/login?back_url=http%3A%2F%2Fexternal_site.com%2F ;