1
我正在按照pagespeed为大多数资源设置过期标题的建议,但是,我似乎无法为所有服务的主机设置配置,它只适用于将其设置为一个虚拟主机wwww .example.com的。而example.com不会成功设置过期标题。我有以下Apache配置。apache expiryByType配置
如何让www.example.com和example.com成功设置到期日期?
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 day"