301 redirect for a url via web.config
I want to redirect a url to be be redirected to another url preserving querystring:
I want to redirect this url:
I have written the following code in my web.config:
<rewrite> <rules> <rule name="Test" patternSyntax="Wildcard" stopProcessing="true"> <match url="http://my.website.com/utilities/myservice.svc/item(.*)" /> <action type="Redirect" url="http://my.website.com/utilities/myservice.svc/items" appendQueryString="true" /> </rule> </rules> </rewrite>
The above code is not working. Can you help me writing the correct rule there?