海兰, 我有我的Drupal网站,我想缓存图像的家庭,但如果在htaccess的写:只缓存一个带有“.htaccess”而不是所有图像(.png)的图像(.png)?
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresByType image/png "access 1 year"
</IfModule>
## EXPIRES CACHING ##
这将是缓存中的所有文件(巴纽)...
我想只缓存一个image.png;所以我问你是否有一种方法缓存只有一个规则在“.htaccess”中的一个元素? 是可能的?
谢谢:))
再见来自意大利)
编辑:
可以写入也:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
<FilesMatch 'image\.png$ sites/all/themess/mysubtheme/images/sm.png'>
ExpiresByType image/png "access 1 year"
</FilesMatch>
</IfModule>
## EXPIRES CACHING ##
???
,最后,如果我有两个图像(.PNG)(被sm.pngËsmall.png)我写:
## EXPIRES CACHING ##
<IfModule mod_expires.c>
<FilesMatch 'image\.png$ sites/all/themess/mysubtheme/images/sm.png'>
ExpiresByType image/png "access 1 year"
</FilesMatch>
<FilesMatch 'image\.png$ sites/all/themess/mysubtheme/images/small.png'>
ExpiresByType image/png "access 1 year"
</FilesMatch>
</IfModule>
## EXPIRES CACHING ##
2°EDIT:
我有写这样的:
<FilesMatch '(image|small)\.png$'>
ExpiresByType image/png "access 1 year"
</FilesMatch>
,但如果我使用“页面速度测试谷歌”或“Pingdom的工具”,而不是结果图像small.png缓存 哪里是电子恐怖?也许我需要插入图像的网址?
没有任何关于该问:/ – Borja