I am trying to use rewrite rules in IIS to route requests like this:
domain.com/users/some%20user%20name
to
domain.com/cms.asp?P=users/some user name
The issue I am seeing is that the rule is removing the spaces altogether. Here is the rule I use:
<rule name="Rewrite Everything Else to cms.asp" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="cms.asp?p={R:1}" logRewrittenUrl="true" />
</rule>
What is causing the spaces to be removed during the rewrite and how can I prevent that?