Hello @David Rodriguez ,
I understand that you created a static website using Azure Blob Storage and Azure CDN Premium from Verizon, where all files and folders are in lowercase format, however, some requests are coming with uppercase characters, and you would like to know if it is possible to transform all incoming requests to lowercase using Azure CDN rules engine.
Yes, it is possible to transform all Azure CDN requests coming with uppercase characters to lowercase using the Azure CDN Premium from Verizon rules engine as you've shown in your comment above. I've tested this in lab, and it works:
I created a static website using Azure Blob Storage and Azure CDN Premium from Verizon and then added the below rule to the Azure CDN Premium from Verizon rules engine under HTTP Large:
Now, when I browse the CDN endpoint with some uppercase letters in the request, it doesn't give me an error and I'm able to browse the site:
This rewrite rule works as I'm able to access the site even with uppercase letters in the request but the URL in the browser doesn't change to lowercase.
So, you need to keep the below points in mind:
- If you do a URL rewrite, CDN rewrites the URL before the request is sent to the backend. This won't change what users see in the browser because the changes are hidden from the user.
- If you do a URL redirect, CDN sends a redirect response to the client with the new URL. That, in turn, requires the client to resend its request to the new URL provided in the redirect. The URL that the user sees in the browser will update to the new URL.
Now, if your end goal is to transform the request to lowercase in the browser itself, then you need to do a URL redirect.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.