diff --git a/.htaccess b/.htaccess
index dd0fce231e84b849df59e4d8de1756214246a33d..956e29ea7c40f20ed98d920090932dd9183ee167 100644
--- a/.htaccess
+++ b/.htaccess
@@ -41,11 +41,12 @@
 
   # Add cache control for static resources
   <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)$">
-    Header set Cache-Control "max-age=15778463"
-  </FilesMatch>
-
-  <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)(\?v=.*)?$">
-    Header set Cache-Control "max-age=15778463, immutable"
+    <If "%{QUERY_STRING} =~ /(^|&)v=/">
+      Header set Cache-Control "max-age=15778463, immutable"
+    </If>
+    <Else>
+      Header set Cache-Control "max-age=15778463"
+    </Else>
   </FilesMatch>
 
   # Let browsers cache WOFF files for a week