Checking if mod_headers is loaded before trying to set Cache-Control headers

This commit is contained in:
HungryFeline 2013-07-03 10:21:21 +02:00
parent 3febf0e443
commit a87aedcef9
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ DefaultType image/jpeg
<IfModule mod_expires.c> <IfModule mod_expires.c>
ExpiresActive On ExpiresActive On
<FilesMatch "([0-9a-f]{32}|\.(gif|jpe?g|png|css|js))$"> <FilesMatch "([0-9a-f]{32}|\.(gif|jpe?g|png|css|js))$">
Header set Cache-Control "public, max-age=2629743" <IfModule mod_headers.c>
Header set Cache-Control "public, max-age=2629743"
</IfModule>
ExpiresDefault "access plus 1 month" ExpiresDefault "access plus 1 month"
</FilesMatch> </FilesMatch>
#ExpiresByType text/html "now" #ExpiresByType text/html "now"