I have a transform rule to rewrite the URL from, as an example, https://example.com/subtitles/12345.vtt into https://example2.com/file/12345.vtt
I want to preserve the path from the original request but load the file from a different domain.
It seems that I can't even get the rule to trigger (regardless of the query) and I have checked there are no conflicting Workers or other rules.
The rule I have at the moment is
(starts_with(http.request.uri.path, "subtitles"))
If I do manage to trigger the rule, how would I extract the end part of the file extension and put this into the rewrite url?
I was able to do this using Workers but not with Transform rules (I want to avoid being restricted by the 100,000 limit if I can)