views:

11

answers:

1

I have an url like this :

mydomain/page?param1=1

and I want rewrite this to :

mydomain/page2?param1=1

<rule name="MyRule" stopProcessing="true">
      <match url="page?(.*)" />
      <action type="Redirect" url="page2?{R:1}" />
</rule>

or

<rule name="MyRule" stopProcessing="true">
      <match url="page\?(.*)" />
      <action type="Redirect" url="page2?{R:1}" />
</rule>

This does not match, I do not understand why

A: 

The ? marks the start of the query string, which is not part of the path.

So if I follow, the rewriter wont even get to see the ? and anything past it.

leppie