Apache
.htaccess
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|txt|swf|pdf|swf|js)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
nginx
location ~ \.(jpg|jpeg|png|gif)$ {
expires 365d;
}
当然你也可以配置nginx支持.htaccess
One comment
933,329,317,57,92,713,690,904