Reputation: 2879
Question Edited for better understanding:
I have a WCF service and any of my links look like :
https://192.168.1.31/ContactLibrary2.0HTTPS/Service.svc/.....
.
I want to get rid of the Service.svc
. I installed URL Writer in IIS but i don't know how to work with it. I search a little bit and didn't find anything to help me with this particular problem.
Any idea ?
Upvotes: 0
Views: 2288
Reputation: 6484
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:
{RESPONSE_CONTENT_TYPE}
matches text/html
{RESPONSE_CONTENT_TYPE}
matches application/xhtml+xmll
^(.*)(/Service\.svc/)(.*)$
{R:1}{R:3}
Upvotes: 1