Rewrite

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Jun 18 15:21:20 CEST 2008


In message <4858AB77.2000100 at gmail.com>, Kamil Radziszewski writes:
>Hi, how can i rewrite url in varnish like this:
>
>
>http://mydomain.com/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)\.[0-9]+\.jpg  => 
>http://backend/$1/$2/$3/$4.jpg


	set req.url = regsub(req.url, $regexp, $replacement);

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list