Varnish redirect is pain.
sub vcl_recv { if (req.http.user-agent ~ "iP(hone|od)") { error 750 "Moved Temporarily"; } } sub vcl_error { if (obj.status == 750) { set obj.http.Location = "http://www.example.com/iphoneversion/"; set obj.status = 302; return(deliver); } }
(via:Redirecting using VCL)
I just want to redirect. but should write code in two action.
This is it lack of maintenance, and I do not like.
I tried to make a vmod_redirect can be easily redirect.
Continue reading »