Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to have an add_header directive inside a location block of the nginx.conf (inside the document root) generated by W3 Total Cache like this

# BEGIN W3TC Page Cache cache
location ~ /wp-content/cache/page_enhanced.*html$ {
expires modified 3600s;
add_header Vary "Accept-Encoding, Cookie";
add_header MyHeader "Value";
}
location ~ /wp-content/cache/page_enhanced.*gzip$ {
gzip off;
types {}
default_type text/html;
expires modified 3600s;
add_header Vary "Accept-Encoding, Cookie";
add_header Content-Encoding gzip;
add_header MyHeader "Value";
}
# END W3TC Page Cache cache

Since W3 Total Cache overwrites this file I'd to know a method to keep it permanent.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.