2011-10-28 28 views

回答

1

第二个应该说0而不是zero

从手册:

通过ExpiresDefault和ExpiresByType指令也可以在形式的更可读的语法来定义:

ExpiresDefault "<base> [plus] {<num> <type>}*" 
ExpiresByType type/encoding "<base> [plus] {<num> <type>}*" 

其中<base>是下列之一:

access 
now (equivalent to 'access') 
modification 

'plus'关键字是可选的。 <num>应的整数值[可接受给atoi()],以及<type>是以下之一:可能已经使用其中创作者在一个点有一个时间此外,还有和忘记了0不是

years 
months 
weeks 
days 
hours 
minutes 
seconds 

ExpiresDefault "access plus zero seconds"与零一样!

+0

我认为语法定义末尾的星号意味着“0次或更多次”,并且大括号表示它是'num'和'type'作为一个单元必须出现0或更多倍。奇怪的是,星号和花括号不在http://httpd.apache.org/docs/2.2/mod/directive-dict.html#Syntax中解释。在此基础上,我可能会认为“0次​​或更多次”会写成“[whatever] ...” – Trott

+0

是的,没错。他们给出的例子是ExpiresByType text/html“访问加1个月15天2小时”,显示了如何重复num类型位。我认为*表示多次,{}表示可选单位。假定[]意味着可选部分,而<>意味着强制性......如果他们解释了这一点,会很好! –

+0

看起来文档可能会使用一些小而重要的说明。我已经提交了一个bug:https://issues.apache.org/bugzilla/show_bug.cgi?id=52112 – Trott