I am trying to make a rule for URL Rewrite 2.0 my internal URL is
http://someserver.net/in40/data/getcase.ashx?type=Good&format=json
("in40" is an application)
I need the following URL to work
http://someserver.net/in40/data/getcase/Good?fmt=json
rule
<match url="^data/getcase/([_0-9a-z-]+)\?fmt=([_0-9a-z-]+)$" />
<action type="Rewrite" url="data/getcase.ashx?type={R:1}&format={R:2}" />
doesn't work
but if I change \?fmt= to /
<match url="^data/getcase/([_0-9a-z-]+)/([_0-9a-z-]+)$" />
then the following URL works fine
http://someserver.net/in40/data/getcase/Good/json
How to make the rewrite rule for
http://someserver.net/in40/data/getcase/Good?fmt=json
^giving the string you are matching is not at the start of the string...