| Posted: 04 January 2009 at 10:55pm | IP Logged
|
|
|
Hi,
I am working on a set of WCF Rest Services. I don't want the user to ever see or know about the .svc extension.
Let's say my service is hosted at: http://localhost/MyProject/MyService.svc
Here are a couple of example URI templates as specified in the [WebGet(UriTemplate="...")] attributes of methods on my service.
/products /products/{category}/{id} /products/{category}/{id}?f={format}
What I would like is for the user to access these resources without seeing the .svc extension. So they should look like this to the user:
http://localhost/MyProject/MyService/products http://localhost/MyProject/MyService/products/{category}/{id} http://localhost/MyProject/MyService/products/{category}/{id}?f={format}
Of course, behind the scenes, the actual code that would be running would be located at:
http://localhost/MyProject/MyService.svc/products http://localhost/MyProject/MyService.svc/products/{category}/{id} http://localhost/MyProject/MyService.svc/products/{category}/{id}?f={format}
I have searched the Helicon forum and Google for an answer, but can't seem to find a specific example of how to do this. Of course, I've found answers like "just use Helicon's ISAPI Rewrite to reroute your urls".
I am looking for the specific rules to put in my httpd.conf file to make this work.
I am using the Lite version on Windows XP with IIS 5.x during development. I expect to be deploying to Windows 2003 with IIS 6, so the solution needs to work for both.
Many thanks in advance!
Edited by jamesrichards - 04 January 2009 at 11:00pm
|