Cache: How to use mod_headers

Asked

Viewed 254 times

2

I have a server Nginx in a shared environment where it is not possible to enable the max-age because the same is part of the mod_expires, in which it is only available in a dedicated environment.

I was instructed by the support to use the mod_headers, but I already did a search on the net and I saw the Apache site but I couldn’t do.

I tried to put in the .htaccess of / and of /www but there was no way. Things I’ve tried:

<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
ExpiresActive On
ExpiresDefault A2592000
</FilesMatch>
<FilesMatch ".(flv|swf|ico|gif|jpg|jpeg|png|js|css|txt|eot|woff|ttf|svg|JPG)$">  
Header set Cache-Control "max-age=2592000"  
</FilesMatch>  
ExpiresActive On
ExpiresByType image/gif       86400000
ExpiresByType image/png       86400000
ExpiresByType image/jpg       86400000
<IfModule mod_headers.c>
    <FilesMatch "\\.(ico|jpe?g|png|gif|swf|css|js)$">
        Header set Cache-Control "max-age=604800, public"
    </FilesMatch>
</IfModule>

Can someone help me use the mod_headers?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.