IIS - 从localhost:8001 / name / secondName /重定向到wcf服务url

时间:2017-08-22 07:14:03

标签: wcf iis

像标题一样的问题 - 我在localhost:8001上有wcf服务,但是我希望它也可以从localhost访问:8001 / name / secondName / 有可能吗?

1 个答案:

答案 0 :(得分:0)

您可以通过URL重写来实现。您需要添加此重写规则:

<rule name="Rewrite /name/secondName" stopProcessing="true">
    <match url="^name/secondName(.*)" />
    <action type="Rewrite" url="{R:1}" />
</rule>