【发布时间】:2016-05-20 06:21:30
【问题描述】:
我已启用 html5mode 以从 web url 中删除散列,之后我收到一个错误。所以我在母版页中提到了基本 href。在 web config 中设置重写 url。
当我进入状态视图页面并刷新页面时,它将显示错误的 url。当在 iis 7.5 中启动应用程序时出现错误。
为此我重写了网址。
<rewrite>
<rules>
<rule name="RewriteRules stopProcessing="true">
<match url=".*"/>
<conditions logicalGrouping="MatchAll">
<add input ="{REQUEST_FILEName}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILEName}" matchType="IsDirectory" negate="true"/>
<add input ="{REQUEST_URI}" pattern="^/(api)" negate="true"/>
</conditions>
<action type="Rewrite" url="home/home"/>
</rule>
</rules>
</rewrite>
</system.webServer>
谁能帮帮我
【问题讨论】:
-
为了解决我已经安装了 Iis url rewrite,之后我无法启动应用程序我得到了另一个错误。检查这个stackoverflow.com/questions/37349939/…,
标签: angularjs asp.net-mvc asp.net-mvc-4 angular-ui-router iis-7.5