'How to swap URL parts with Verizon Premium URL Rewrite rule?
I am using Verizon Premium in my Azure account and I have a difficulty in customising the URL Rewrite rule to swap parts of the incoming URLs.
I would like to rewrite the incoming URL, i.e.
/80XXXXXX/cdnendpoint/942bd11a1026c2343e53c84c767b1ddef5fd0a0b76b0ccd1d61db4d98915/container/index.html
to
/80XXXXXX/cdnendpoint/container/index.html?942bd11a1026c2343e53c84c767b1ddef5fd0a0b76b0ccd1d61db4d98915
where 942bd11a1026c2343e53c84c767b1ddef5fd0a0b76b0ccd1d61db4d98915 is the token required for CDN Token Auth in the subsequent rule.
How can I do this with Verizon Rewrite rule? I tried to implement a few different rules, which were all failed, and the difficulty is that I can't find a way to debug/test the rule I write.
I figured the regex to capture the token bit from the source is ((?<=cdnendpoint\/)(.*)(?=\/container)) and I can also get the bit from container to the end of the path with (container\/.*), but I couldn't figure out how to put all these regex in the Source and Destination to restructure the URL to achieve the target URL.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
