Transform Rule: replace part of url

Hi!

I want to transform part of this url: https://static.domain.com/sites/10/2022/06/Ul-0.-jpg-1.jpg, by rewrite “/sites/10/” to “/”. Served end result should be: https://static.domain.com/2022/06/Ul-0.-jpg-1.jpg

My transform criteria are:
(http.request.uri.path contains “/sites/10/”)

But the rewrite does not seem to do anything… Can you help troubleshoot this rule

What is the actual domain? Can you share a copy of the rules screen?

So the domain is static.micronordic.com, the rules are set on the micronordic.com CF panel.
Rule is: Screenshot, 2022-11-24 00:40:51 - Paste.Pics

Reply from support for any future seekers:

have looked into this possibility with Transform Rules for you, and from what I can see it appears this is only possible using a Regex function in the Transform Rule, which unfortunately is only available on Business plans and higher, which you see see here: Transform Rules · Cloudflare Rules docs

With Regex support, you would be able to change the Transform Rule to Dynamic and enter the following expression:
regex_replace(http.request.uri, "^/sites/10(.+)$", "${1}")
You will then likely also want to set the matching rule to only match the static subdomain, unless you want the rule to apply on all subdomains.