apache2:wordpress做靜態檔的 browser caching時,.htaccess設定

步驟一、先打開mod_expires

可參考:
http://programmer.hsinchi.info/2016/12/05/mod-expires/

步驟二、在.htaccess加入以下:

# BEGIN EXPIRES
ExpiresActive On
ExpiresDefault "access plus 10 days"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/plain "access plus 1 month"
ExpiresByType image/svg+xml "access 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-icon "access plus 1 year"
# END EXPIRES

參考來源:
Apache2 載入 Expires 的模組(mod_expires) 與 設定

WP Super Cache and Browser Caching