Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to set two different http headers for cache control for two different portions of our site.

These are the lines in my site.conf for the virtual host:

<Location ~ "^/(sub1|sub2|sub3|sub4)">
Header set Cache-Control max-age=60,public
</Location>

and

<Location ~ "^/(sub5|sub6|sub7|sub8)">
Header set Cache-Control no-cache
</Location>

I can see the headers set correctly for the first set of sub pages, but not for the second set.

I feel like I am missing something very small and obvious.

Any ideas?

Thanks!

KM

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Figured it out -- removed the quotes around the expression and the cache controls are being set correctly. Hopefully, this is helpful.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.