Hey,
I am currently trying to set Rewrite Rules via appcmd and i can't figure out where i go wrong.
The desired outcome would be:
<rewrite>
<rules>
<rule name="Client Angular Routes" stopProcessing="true">
<match url="Client*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="Client/index.html" />
</rule>
</rules>
</rewrite>
I start of with:
set config "MyWebApplication" -section:system.webServer/rewrite/rules /+"[name='ClientAngularRoutes', stopProcessing='True']" /commit:""MyWebApplication""
This correctly adds a new Rule in the rewrite section.
Here i am stuck. I can't figure out how to add the match tag.
My command currently looks like this:
set config "MyWebApplication" -section:system.webServer/rewrite/rules.[name='ClientAngularRoutes'] /match.url:'Client*' /match.ignoreCase:true /commit:""MyWebApplication""
This command fails with: Unknown config section...
What am i doing wrong?