Posted by supermoos on January 17, 2013 at 2:52pm
Hello
I need a guy who has experience with switching out content based on a cookie value, just two blocks switching based on a cookie value, while still having varnish kick in.
So varnish/drupal guru needed.
This is a paid job.
Comments
Something like that
This is similar to what you want. It redirects the home page to /welcome if you don't have the cookie set.
Needs to be modified to your specifics.
sub vcl_recv {
if (req.url == "/" &&
req.http.Cookie !~ "name_of_your_cookie")
error 752 "/welcome";
}
}
sub vcl_error {
if (obj.status == 752) {
set obj.http.Location = obj.response;
set obj.status = 302;
return(deliver);
}
}
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba