I’ve got a VPS to run a few WordPress sites, each using WP Super Cache in mod_rewrite mode.
I’m just wondering what are the best config settings to use with the mod_expires and mod_headers Apache modules so they work optimally with WP Super Cache?
Here’s what I’ve got at the moment, I’m keen to know if these settings are good or could be improved:
# Turn on Expires and set default to 0 ExpiresActive On ExpiresDefault A0 # cache media files for 30 days <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"> ExpiresDefault A2592000 Header append Cache-Control "public" </FilesMatch> # cache image/flash files for 30 days <FilesMatch "\.(gif|jpg|jpeg|png|swf)$"> ExpiresDefault A2592000 Header append Cache-Control "public" </FilesMatch> # 1 hour caching for commonly updated files <FilesMatch "\.(xml|txt|html|js|css)$"> ExpiresDefault A3600 Header append Cache-Control "proxy-revalidate" </FilesMatch> # No caching for dynamic files <FilesMatch "\.(php|cgi|pl|htm)$"> ExpiresActive Off Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform Header set Pragma "no-cache" </FilesMatch>
Any advice is much appreciated,
- The topic ‘mod_expires & mod_headers config for WP Super Cache’ is closed to new replies.