I am attempting to unset Cache-Control's max-age via .htaccess. The next removes Cache-Control entirely:

Header unset Cache-Control

How do you tell it to get rid of just "max-age?" Thanks.

In Apache 2.2.4 there's a brand new Header edit action that enables you to definitely just do these type of manipulations.

In the Apache documentation: If the request header is available, its value is changed based on a normal expression search-and-replace. The worthiness argument is really a regular expression, and also the alternative is really a alternative string, which might contain backreferences.

However, the regex needed could be fairly complicated. Hence I would recommend to simply use Header set to override the present Cache-Control if you're able to hardcode the worthiness. While using set action overrides the prior value that contains max-age.