<IfModule mod_headers.c>
RewriteCond "%{HTTP:Accept-encoding}" "zstd"
RewriteCond "%{REQUEST_FILENAME}.zst" -s
RewriteRule "^(.*)\.(css|html|js|mjs|svg)$" "/$1.$2.zst" [QSA]
RewriteRule "\.css\.zst$" "-" [T=text/css,E=no-brotli:1,E=no-gzip:1,E=no-zstd:1]
RewriteRule "\.html\.zst$" "-" [T=text/html,E=no-brotli:1,E=no-gzip:1,E=no-zstd:1]
RewriteRule "\.js\.zst$" "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1,E=no-zstd:1]
RewriteRule "\.mjs\.zst$" "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1,E=no-zstd:1]
RewriteRule "\.svg\.zst$" "-" [T=text/javascript,E=no-brotli:1,E=no-gzip:1,E=no-zstd:1]
<FilesMatch "(\.css|\.html|\.js|\.mjs|\.svg)\.zst$">
Header append Content-Encoding zstd
Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>