I've borrowed some
mod_expires code from the HTML5 Boilerplate that adds some sensible defaults for asset expiry (I have filename version revving configured with htaccess so I can add mtimes before asset extensions like
ExpiresActive on ExpiresDefault "access plus 1 month" # CSS ExpiresByType text/css "access plus 1 year" # Data interchange ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType text/xml "access plus 0 seconds" # ... etc ...
However, I'd like to disable these on my development server (which sets a
DEVELOPMENT=1 environment variable). Is it possible to conditionally disable
ExpiresActive On) in 2.4.4 like you can with
mod_access if an environment variable is set (
Allow from env=DEVELOPMENT) ?