On 23/10/2011 20:54, Eric Covener wrote:
A more advanced version would be to allow custom HTTP headers using an
[HH=Foo:Bar] syntax or similar, but this may be going a bit far.
Does env=xxx in the Header directive then R=...,E= in RewriteRule work?

Hi Eric,

I haven't got a test environment to hand right now, but that looks promising - I didn't spot the conditional form of Header directive; clearly I should have read the page more carefully. ;)

I'm not sure if directive order would matter, but in principle maybe something like this would work:

Header set Cache-Control max-age=%{CACHE_LIFETIME}e env=CACHE_LIFETIME
RewriteRule /example http://example.com [R=302,E=CACHE_LIFETIME:604800]

I'll have to play around, and let you know how I get on - thanks for the tip.
Regards,
Rowan


Reply via email to