如何将多个旧应用程序重定向到IIS中的较新版本应用程序?

时间:2012-02-27 04:14:25

标签: iis-7 url-rewriting web-config url-routing custom-error-handling

My IIS server has multiple application in single website. Here am planned to turn off(remove) the older application from IIS and redirect to newer version. 

For example:

www.mydomain.com/demos/2.0/ (older version)
www.mydomain.com/demos/3.0/ (older version)
www.mydomain.com/demos/3.5/ (older version)
www.mydomain.com/demos/4.0/ (newer version)

我已经使用通配符检查了这个url重写模块和其他人。对此有何想法?

1 个答案:

答案 0 :(得分:0)

创建规则以重写或重定向(type="Rewrite"type="Redirect")请求:

<rule name="GoToNewVersion" stopProcessing="true">
    <match url="demos/[23]\../" ignoreCase="true" />
    <action type="Rewrite" url="/demos/4.0/" />
</rule>