Wednesday, October 15, 2008

Getting rid of the .svc Extension in IIS

Jon posted a module that does this.

I recently tried to use the URL rewriting module for IIS 7 to achieve the same - this rule worked for me:

<system.webServer>
  <
rewrite>
    <
rules>
      <
rule name="Remove .svc">
        <
match url="^([0-9a-zA-Z\-]+)/([0-9a-zA-Z\-\.\/\(\)]*)" />
        <
action type="Rewrite"
               
url="{R:1}.svc/{R:2}" />
      </
rule>
    </
rules>
  </
rewrite>
</
system.webServer>

 

HTH


IIS | WCF
Wednesday, October 15, 2008 7:30:44 PM UTC  #