I am facing an issue where my URL is redirecting to Azure default domain instead of custom URL. I want to remove the trailing slash and make the URL in lowercase.
For example: https://www.abc.com/About-Us/
should redirect to https://www.abc.com/about-us
but in my scenario it redirecting to https://abc.azurewebsites.net/about-us
Rules Added are:
<rule name="RemoveTrailingSlashRule" stopProcessing="true">
<match url="(.*)/$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="{R:1}" />
</rule>
<rule name="Lowercase" stopProcessing="true">
<match url="[A-Z]" ignorecase="false" />
<action type="Redirect" url="{ToLower:{URL}}" />
</rule>
I have also tried using {HTTP_HOST}
but it did not work as well.