I need to redirect a url with a variable hashcode to another url with that same hashcode in IIS10 (Windows Server 2019).
Example:
https://www.example.com/hello/sd54effg1g5s11d5111dwds21fds2f1ffd
Needs to redirect to:
https://subdomain.example.com/hello/sd54effg1g5s11d5111dwds21fds2f1ffd
At the moment i have this as a rule in the web.config:
<rule name="rulename" stopProcessing="true">
<match url="^hello/[a-zA-Z0-9]+$" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(https:\/\/www\.)example.com$" />
</conditions>
<action type="Redirect" url="https://subdomain.{HTTP_HOST}/{R:1}" />
</rule>