【发布时间】:2012-04-12 01:28:07
【问题描述】:
我知道以前有人问过这个问题,但我还没有找到我遇到的问题的答案。我正在尝试将域(不是子域)重定向到子文件夹。我正在运行 IIS 7,并创建了这样的 URL 重写规则:
<rule name="subfolder" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(www\.)?domain.com$" />
<add input="{PATH_INFO}" pattern="subfolder" negate="true" />
</conditions>
<action type="Rewrite" url="/subfolder/{R:0}" />
</rule>
关闭规则后,我可以导航到类似http://domain.com/subfolder/index.htm 的页面。启用它后,当我尝试导航到 http://domain.com/index.htm 时出现 403 错误。
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
我该如何解决这个问题?
【问题讨论】:
标签: iis url-rewriting