The following should work - at least it did in a short test for me:
<rule name="Redirecton" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.(.*)\.test\.at(.*)" />
</conditions>
<action type="Redirect" url="http://{C:1}.test.at/{R:0}" />
</rule>
What I changed:
- Escaped the
.
as\.
- Created captures using parantheses
- Adapted the redirect target to work - I am not shure why it is that way:
- {C:0} is the complete input string
- {C:1} is the first capture
- {C:2} is empty
- {R:0} is the second capture