分享、学习、提高
2007/01/29 16:46
首页是apache要装上了mod_expires模块,然后在配置文件中加如下类似代码,即可。


   ExpiresActive on
   ExpiresDefault "now plus 24 hours"


24 hours还可以写为 3 days,4 weeks,1 month等等。

语法:
ExpiresDefault " [plus] { }*"
ExpiresByType type/encoding " [plus] { }*"

where is one of:

access
now (equivalent to 'access')
modification
The plus keyword is optional. should be an integer value [acceptable to atoi()], and is one of:

years
months
weeks
days
hours
minutes
seconds

关于ExpiresDefault的更多设置请参阅官方说明:http://httpd.apache.org/docs/2.2/mod/mod_expires.html#expiresdefault
发表评论
表情
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]