我正在使用带有Apache HTTP反向代理的IIS网站( ProxyRequests Off mod_proxy)。 我想在apache中控制expires头文件(不要问),但是IIS设置头文件Expires: -1 。
这会导致mod_expires忽略该请求,因为它已经有了一个值。
我试过在https://stackoverflow.com/questions/7930140/overwrite-cache-headers-with-mod-expires的解决scheme,但它不起作用(早期的技巧不起作用)。
如何禁用IIS以指定Expires: -1 ?
要么
我如何强制mod_expires重写它(因为我使用Apache作为反向代理,我应该能够做到这一点!)
mod_expires不能做到这一点,但mod_header可以。 它的configuration非常简单:
Header set theHeader theValue
如果你只是想用mod_header去除Expires: -1 ,你也可以这样做:
Header unset Expires
在你的代理configuration。