Open barryrobison opened 8 years ago
Rewrite works fine on the first hit, but if a TTL is set then cache hits cause a 502 BAD_GATEWAY response.
VCL looks like
sub vcl_deliver { if ( obj.hits == 0 && req.http.host == "blog.staging.wpengine.com" ) { rewrite.rewrite_re("blog.staging.wpengine.com", req.http.orighost+"/blog"); rewrite.rewrite_re({""/wp-content"}, {""/blog/wp-content"}); rewrite.rewrite_re({"'/wp-content"}, {"'/blog/wp-content"}); } }
Tested against 3.0.5 and 3.0.7.
Rewrite works fine on the first hit, but if a TTL is set then cache hits cause a 502 BAD_GATEWAY response.
VCL looks like
sub vcl_deliver { if ( obj.hits == 0 && req.http.host == "blog.staging.wpengine.com" ) { rewrite.rewrite_re("blog.staging.wpengine.com", req.http.orighost+"/blog"); rewrite.rewrite_re({""/wp-content"}, {""/blog/wp-content"}); rewrite.rewrite_re({"'/wp-content"}, {"'/blog/wp-content"}); } }