【发布时间】:2010-12-08 17:17:26
【问题描述】:
我正在尝试为特定 URI 设置过期标头,但由于某种原因它不起作用,到目前为止我在 httpd.conf 文件中所做的如下:
<LocationMatch "/mysite/contentservices/weather/get.json">
ExpiresDefault A86400
</LocationMatch>
<LocationMatch "/mysite/*">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
ExpiresByType text/css "access plus 1 day"
ExpiresByType text/javascript "access plus 1 day"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
</LocationMatch>
这根本不适合我。我指定的内容没有到期日期标题。我也不明白当你有两个重叠的 LocationMatch 指令时会发生什么,第一个指令优先?
【问题讨论】:
标签: apache configuration