我正在使用一种破坏缓存的机制,它在页面上的每个资源中都包含一个版本号。
示例:
<link rel="stylesheet" type="text/css" href="styles/viewnote.<?php echo VERSION; ?>.css" />输出:
<link rel="stylesheet" type="text/css" href="styles/viewnote.100.css" />实际文件的名称是viewnote.css,因此,我需要使用htaccess删除版本号。
我用过这个示例
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]但这不管用:

https://stackoverflow.com/questions/32484897
复制相似问题