2010-04-23 43 views

回答

0

在您的.htaccess文件中嘗試使用FilesMatch指令。

如:

# cache most product images at client side 
ExpiresActive on 
<FilesMatch "^images/products/[^\.]*\.(gif|jpe?g|png)$"> 
    ExpiresByType image/png "access plus 1 month" 
    ExpiresByType image/gif "access plus 1 month" 
    ExpiresByType image/jpeg "access plus 1 month" 
    Header append Cache-Control "public" 
</FilesMatch> 

編輯:這似乎是錯的! FilesMatch據說只匹配文件,所以你也不能匹配目錄。對不起,不好的帖子。

+0

是的,這是問題,我已經想出了一個解決方案順便說一句會發布它,當我得到時間:) – 2010-08-18 12:40:39

相關問題