# @version $Id: .htaccess 130 2010-09-29 10:03:56Z jax.hu $
#Options -FollowSymLinks -Indexes #TODO 開發時關閉
# 關閉 Apache Rewrite 模組
<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>
# 啟用 Apache mod_expires 模組,來管理 browser 端的 cache 時間
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0
# ExpiresDefault "<base> [plus] {<num> <type>}*"
# base:[ access | modification ]
# type:[ years | months | weeks | days | hours | minutes | seconds ]
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault "access plus 1 years"
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|png|gif|swf|txt|xml|js|css)$">
ExpiresDefault "access plus 7 days"
</FilesMatch>
</IfModule>
# 關閉 Apache 對檔案的實體標籤
FileETag none
參考來源:
mod_expires - Apache HTTP Server:
mod_expires - Apache 2.2 中文版参考手册:
Apache2 載入 Expires 的模組(mod_expires) 與 設定
ezDIY.org / 使用mod_expires模組來加速網頁瀏覽
沒有留言:
張貼留言
你好!歡迎你在我的 Blog 上留下你寶貴的意見。