Home › Forums › IIS 7.0 › IIS7 - URL Rewrite Module › Hiding the .svc extension for WCF services
Previous Next
Last post 07-25-2008 12:45 PM by ruslany. 1 replies.
Average Rating Rate It (5)Thank you for the rating!
Page 1 of 1 (2 items)
Sort Posts: Oldest to newest Newest to oldest
Does anyone know how do I set up a rule using the rewrite module to hide the .svc extension from the url so that I can have it more REST friendly.
For ex. instead of having something like
http://localhost/photoalbum.svc/photos/cat
I would like to have it as
http://localhost/photoalbum/photos/cat
Regards,Kannan
try this:
<rule name="Hide svc"> <match url="^photoalbum/([0-9a-zA-Z/]+)$"> <action type="Rewrite" url="photoalbum.svc/{R:1}"></rule>