Simple redirect

kokoniimasu kokoniimasu at gmail.com
Thu Feb 9 17:59:27 CET 2012


Hi,

Varnish redirect is necessary to write in two actions.
I tried to be simply redirect.

For example, to redirect  http://www.example.com


    import rewrite;
    sub vcl_recv{
      error( rewrite.location( 302,"http://www.example.com/" ) );
    }


vcl_error is not necessary

blog-post:
  http://blog.xcir.net/index.php/2012/02/varnish-redirect-operation-to-easylibvmod-rewrite/

code:
  https://github.com/xcir/libvmod-rewrite


and wrote code to simplify the output of the varnishlog.
  http://blog.xcir.net/index.php/2012/02/convert-varnishlog-output-to-easy/


I hope that this code is of help to you.

--
Syohei Tanaka(@xcir)
http://xcir.net/



More information about the varnish-misc mailing list