Mobile redirect question

2011-03-29 Thread Maikel - Songteksten.nl
Hi, I'm using currently the following code to do a mobile site redirect. I found it somewhere on the internet. if ( req.http.user-agent ~

Re: Mobile redirect question

2011-03-29 Thread Bjørn Ruberg
On 29. mars 2011 14:56, Maikel - Songteksten.nl wrote: Hi, I'm using currently the following code to do a mobile site redirect. I found it somewhere on the internet. if ( req.http.user-agent ~

Re: Mobile redirect question

2011-03-29 Thread Maikel - Songteksten.nl
The redirect looks like this: sub vcl_error { if (obj.status == 750) { set obj.http.Location = obj.response; set obj.status = 302; return(deliver); } } Maikel On Tue, 2011-03-29 at 15:04 +0200, Bjørn Ruberg wrote: On 29. mars 2011 14:56, Maikel -

RE: Mobile redirect question

2011-03-29 Thread Caunter, Stefan
On 29. mars 2011 14:56, Maikel - Songteksten.nl wrote: Hi, I'm using currently the following code to do a mobile site redirect. I found it somewhere on the internet. if ( req.http.user-agent ~ (.*Android.*|.*Blackberry.*|.*BlackBerry.*|.*Blazer.*|.*Ericsson.*|.*ht

Re: Mobile redirect question

2011-03-29 Thread Geoff Simmons
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 03/29/11 02:56 PM, Maikel - Songteksten.nl wrote: if ( req.http.user-agent ~

varnish as traffic director

2011-03-29 Thread Jonathan Leibiusky
hi! is there any way to use varnish to direct my traffic to different backends depending on the requested url? so for example I would have 2 different backends: - search-backend - items-backend if the requested url is /search I want to direct the traffic to search-backend and if the requested url

Re: varnish as traffic director

2011-03-29 Thread AD
sub vcl_recv { if (req.url ~ ^/search) { set req.backend = search-backend; } elseif (req.url ~ ^/items) { set req.backend = items-backend; } } On Tue, Mar 29, 2011 at 10:43 PM, Jonathan Leibiusky ionat...@gmail.comwrote: hi! is there any way to use varnish to direct my traffic

Re: varnish as traffic director

2011-03-29 Thread Jonathan Leibiusky
Thanks! If I have 100 of different rules, I would have a very big if block, right? Is this a common use case for varnish? On Tue, Mar 29, 2011 at 11:52 PM, AD straightfl...@gmail.com wrote: sub vcl_recv { if (req.url ~ ^/search) { set req.backend = search-backend; } elseif