Re: Redirect Question

From: Sriram Chavali <schavali#tellapal.com>
Date: Fri, 26 Feb 2010 13:39:48 -0800


Thanks for your reply,

The redirect location is actually on a different server that is behind the firewall. What is best way to configure for this?

Sriram

On Feb 26, 2010, at 1:36 PM, Willy Tarreau wrote:

> On Fri, Feb 26, 2010 at 01:24:25PM -0800, Sriram Chavali wrote:

>> I have written a rule in my haproxy configs to redirect the incoming request to a certain page based on an acl rule being satisfied. It looks like as following:
>> redirect location http://server:port/violation.html if acl_met
>> 
>> The redirected page is on the same server - however I don't want the redirected server's name and port to show up in the redirected URL that he client sees in his browser. I want the base URL (http://www.mysite.com) to be preserved for this redirected page. How can I accomplish this? Do I need to use a directive other than redirect?

>
> If the page is at the same place, use a relative location instead :
>
> redirect location /violation.html if acl_met
>
> It's a lot cleaner.
>
> Regards,
> Willy
>
Received on 2010/02/26 22:39

This archive was generated by hypermail 2.2.0 : 2010/02/26 22:45 CET