Front Door // Rule Engine - Transform to lowercase (bug)

Nibbler 616 Reputation points
2020-09-18T06:59:03.443+00:00

Hi Microsoft Q&A
I want to ensure that the URL path is always in lowercase. This is possible by using the “transform to” in the Rule Engine, but it only works if all the letters in the path is uppercase, and no trailing dash.

A few examples that doesn’t work.

www.contoso.com/TEST/
www.contoso.com/Test
www.contoso.com/Test/
www.contoso.com/tEST
www.contoso.com/tEST/
www.contoso.com/TEsT
www.contoso.com/TEsT/
www.contoso.com/TESt
www.contoso.com/TESt/
… the list could continue…

Rule configuration that works for www.contoso.com/TEST > www.contoso.com/test![25718-test.jpg][1]

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
587 questions
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 47,696 Reputation points Microsoft Employee
    2020-10-06T13:51:20.733+00:00

    Hello @KianE1980 ,

    Below is the configuration that helped us rewrite URL path from UPPERCASE > lowercase where the URL ends with a trailing slash, using the Azure Front Door Rule Engine:

    30491-lowercasewithtrailingslash.jpg

    Appreciate your co-operation and understanding!

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to close the thread by clicking "Accept the answer", as this can be beneficial to other community members.


1 additional answer

Sort by: Most helpful
  1. Nibbler 616 Reputation points
    2020-10-08T20:52:56.077+00:00

    Hi Gita,

    I found a error in our above solution, that though it transforms the last uppercase letter with slash (www.test.com/tesT/ > www.test.com/test/) it doesn’t take into account without the slash as well as if all is uppercase.

    31043-afd-test.jpgTo solve this, one need to add second value in the first rule “test” + “test/”. When this is added, the rule works in any combination of upper-/lowercase scenarios.

    Se the rule will look like as in the screendump

    0 comments No comments