Permanent Redirects

Laurence Rowe l at lrowe.co.uk
Sun Nov 8 00:52:59 CET 2009


2009/11/6 Stephen Nelson-Smith <sanelson at gmail.com>:
> Hi,
>
> I have two old DNS names which point to my new website:
>
> anoldcrapname.com
> anotheroldname.com
>
> ---> myrealsite.com
>
> As varnish handles all port 80 traffice, any redirects need to be
> handled by Varnish.
>
> How can I do this?
>
> One approach would be to have varnish pass those names through to
> apache, and have apache do a redirect, but is there a way to do it in
> VCL?

See http://varnish.projects.linpro.no/wiki/VCLExampleAlexc in the
mobile redirects section of vcl_recv and vcl_error.

Laurence



More information about the varnish-misc mailing list