rewrite condition to target Via: Varnish 1.1
Posted
by
P4ul
on Server Fault
See other posts from Server Fault
or by P4ul
Published on 2012-04-12T02:25:41Z
Indexed on
2012/04/12
5:33 UTC
Read the original article
Hit count: 549
I have a Drupal site that uses Varnish.
I am trying to redirect people that come to a url starting with /node
when they view the site via Varnish.
I have tried the following in the .htaccess file but it gives 500 errors.
RewriteCond %{HTTP:Via} =1.1 varnish
RewriteRule ^node / [R=301,NC,L]
I haven't been able to find anything using google in relation to how to target the 'Via' section of a header.
Cheers, Paul
© Server Fault or respective owner