Assuming you are configuring the application hosted at /ContactLibrary2.0HTTPS
directly (and not the website containing that directory, for example), you may add an exact match for:
rest/GetContact
with a rewrite url of:
Service.svc/rest/GetContact
Perhaps you wish to rewrite every action of Service.svc, however; then you would need a regular expression match for:
^rest/.*$
with a rewrite url of:
Service.svc/{R:0}
UPDATE
Assuming you also need to remove that string from the urls of your HTML pages, you would need to couple the aforementioned inbound rule with a new outbound rule, applied to the files you are interested in.
To do that, please:
- add a new outbound rule to your website and give it a name;
- add a new precondition with two rules (matching any of them):
{RESPONSE_CONTENT_TYPE}
matches text/html
{RESPONSE_CONTENT_TYPE}
matches application/xhtml+xmll
- configure the rule to match the response scope, matching the content within A tags:
- should match the pattern using a regular expression;
- with this pattern:
^(.*)(/Service\.svc/)(.*)$
- case insensitive;
- configure the action to be a rewrite, with this value:
{R:1}{R:3}