The following rule works (successfully redirects) for urls like:
www.site.com/some/path
But doesn't work (404) for urls containing +
sign:
www.site.com/some/p+a+t+h
And doesn't work (404) even when encoded:
www.site.com/some/p%2Ba%2Bt%2Bh
But works, when +
is going after ?
sign:
www.site.com/some/path?+
Rule:
<rule name="redirectForWww" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.site.com$" />
</conditions>
<action type="Redirect" url="http://site.com/{R:0}" />
</rule>
IIS 7.0, URL Rewrite Module 2.0