Hi Christoph-2414,
You can use URL Rewrite Module to rewrite the URLs as per your requirements. To find more about URL Rewrite module and see how you can configure it, please follow the below URL
https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-configuration-reference
You may find the following string function reference already available in the document.
There are three string functions available for changing the values within a rewrite rule action, as well as any conditions
- ToLower - returns the input string converted to lower case.
- UrlEncode - returns the input string converted to URL-encoded format. This function can be used if the substitution URL in rewrite rule contains special characters (for example non-ASCII or URI-unsafe characters).
- UrlDecode - decodes the URL-encoded input string. This function can be used to decode a condition input before matching it against a pattern.
Refer an example below.
<rule name="Redirect to canonical url">
<match url="^(.+)" /> <!-- rule back-reference is captured here -->
<conditions>
<!-- Check whether the requested domain is in canonical form -->
<add input="{HTTP_HOST}" type="Pattern" pattern="^www\.mysite\.com$" negate="true" />
</conditions>
<!-- Redirect to canonical url and convert URL path to lowercase -->
<action type="Redirect" url="http://www.mysite.com/{ToLower:{R:1}}" redirectType="Found" />
</rule>
Hope this helps