【发布时间】:2018-03-21 13:15:45
【问题描述】:
URL 路由工作正常,但是当我在 IIS 网站中创建应用程序时,应用程序停止工作并出现错误
HTTP 错误 500.52 - URL 重写模块
这条规则运行良好 (http://abcd/)
<rule name="AngularJS Routes" stopProcessing="false">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/"/>
</rule>
但是当我更改它的应用程序时,它给出了错误 (http://abcd/app/)
<rule name="AngularJS Routes" stopProcessing="false">
<match url="(^app/.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/app/"/>
</rule>
我在谷歌上搜索过,但没有找到解决方案。需要专家指导。谢谢
【问题讨论】:
标签: asp.net iis url-rewriting web-config angular2-routing