IIS Rewrite Multiple URLS to Ports
Solution 1:
Something like this (in your web.config) should work:
<rule name="solution1" stopProcessing="true">
<match url="^(solution1/)(.*)" />
<action type="Rewrite" url="http://localhost:8888/{R:2}" />
</rule>
<rule name="solution2" stopProcessing="true">
<match url="^(solution2/)(.*)" />
<action type="Rewrite" url="http://localhost:8890/{R:2}" />
</rule>
IIRC, the {R:0}
will match the entire URL, so you don't want that in this case. Instead, with the (
and )
you define 'capturing groups'; {R:2}
will be everything after solution1/
or solution2/
.
If you're set on using the IIS GUI, I hope you'll be able to find the fields that need to be filled; they are the same ones you already use, only with different parameters.