【发布时间】:2016-04-15 18:14:48
【问题描述】:
我在 IIS7 中有一个 aspx 网站,根目录中有一个虚拟文件夹(称为“app”),这是另一个 aspx 应用程序。
我希望 www.main.com/section 显示来自 www.other.com/page 的内容。 但是,www.main.com/section/app,我想忽略之前的重定向(它会虚拟文件夹内容)。
我无法让它工作。这就是我所拥有的:
<rule name="Landing page" enabled="true">
<match url="landing" />
<action type="Rewrite" url="http://www.other.com/page" />
</rule>
这可能吗?
【问题讨论】:
-
我认为您必须在重写规则中添加条件。
-
此参考可能有助于iis.net/learn/extensions/url-rewrite-module/… 特别是
AbortRequest<action>类型。
标签: asp.net redirect url-rewriting iis-7