Varnish Redirect Origin

Anand Shah imanandshah at gmail.com
Sat May 14 05:37:11 CEST 2011


HI Thiago,

I have made this working. Just a regsuball in vcl_error.

 set obj.http.Location = "http://" regsub(req.http.host, "^a.com", "abc.com")
req.url;

Thanks to Tollef

Regards,
     Anand

On Fri, May 13, 2011 at 4:25 AM, Thiago Figueiro <TFigueiro at au.westfield.com
> wrote:

> Anand Shah <imanandshah at gmail.com> wrote:
>
> > No updates on mailing list.... isn't there any one who has faced
> > this issue earlier ....
>
> Have you read the doco? I had a quick look and it seems to have what you
> need.
>
> http://www.varnish-cache.org/docs/2.1/reference/vcl.html
>
> Count the number of redirects.  If you reach your limit do the 302.
>
> I believe vcl_recv would be the place for that.  From the doco:
>
> sub vcl_recv {
>    if (req.restarts > X ) {
>       # do your redirect here
>    }
>
>
> ______________________________________________________
>    CONFIDENTIALITY NOTICE
> This electronic mail message, including any and/or all attachments, is for
> the sole use of the intended recipient(s), and may contain confidential
> and/or privileged information, pertaining to business conducted under the
> direction and supervision of the sending organization. All electronic mail
> messages, which may have been established as expressed views and/or opinions
> (stated either within the electronic mail message or any of its
> attachments), are left to the sole responsibility of that of the sender, and
> are not necessarily attributed to the sending organization. Unauthorized
> interception, review, use, disclosure or distribution of any such
> information contained within this electronic mail message and/or its
> attachment(s), is (are) strictly prohibited. If you are not the intended
> recipient, please contact the sender by replying to this electronic mail
> message, along with the destruction all copies of the original electronic
> mail message (along with any attachments).
> ______________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110514/2205d9b1/attachment-0003.html>


More information about the varnish-misc mailing list