开发者

Adding far future Expires header to .ttf and .otf files

AddType font/opentype .otf
AddType font/truetype .ttf
AddType font/ie .eot
<FilesMatch "\.(otf|eot|ttf|ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
</FilesMatch>

I'm trying to add far future Expires header to my font files. This is what I have in my .htaccess file but it doesn't work. Am I missing som开发者_运维百科ething?


Does it work for other files like CSS/gif/png? If not then you probably don't have permissions to change the headers through .htaccess. If you have access to the server you can put the same code in your httpd.conf file, otherwise ask your host to do it or give you more permissions in .htaccess files.

If it does work for other files maybe try renoving the AddType directives to see if that works, or moving those directives below the setting of the headers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜