In message <[email protected]>, Rob A
yres writes:

>I've had to put an instance of apache behind varnish as a redirector as I
>can't think of a way of making varnish do it. Can this apache rewrite be
>done in vcl?
>
>RewriteRule  ^/(.*)/home/(.*)$  http://$1_host.example.com/$2 [P]

Not right of the bat.

Provided you add backend instances for all the servers serving
these domains it is possible, but you need to do the $1 part as
a if/elseif/elseif/elseif/.../else to set the req.backend.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to