httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rowan Collins <>
Subject Re: RFE: Control of HTTP cache control headers within mod_rewrite rules
Date Sun, 23 Oct 2011 21:02:43 GMT
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 [R=302,E=CACHE_LIFETIME:604800]

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

View raw message