Asp.net “angular”的IIS URL重写失败;“资产”;文件夹
我正在尝试在IIS中使用URL重写部署angular 6项目(使用延迟加载模块路由)。下面是我的文件夹结构 下面是我的web.config文件Asp.net “angular”的IIS URL重写失败;“资产”;文件夹,asp.net,angular,iis,url-rewriting,iis-7.5,Asp.net,Angular,Iis,Url Rewriting,Iis 7.5,我正在尝试在IIS中使用URL重写部署angular 6项目(使用延迟加载模块路由)。下面是我的文件夹结构 下面是我的web.config文件 <configuration> <system.webServer> <rewrite> <rules> <rule name="Angular Routes" stopProcessing="true"> <match url=".*" /
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<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>
</rules>
<outboundRules>
<rule name="CDN_ReWrite_Images" enabled="true" preCondition="IsHtml" stopProcessing="true">
<match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)/(assets)/(.*)" />
<action type="Rewrite" value="http://localhost:4300/{R:3}" />
<conditions>
</conditions>
</rule>
<preConditions>
<preCondition name="IsHtml" logicalGrouping="MatchAny">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>
相反,它试图访问
http://localhost:4300/assets/json/data_list.json
让我知道我做错了什么。谢谢
http://localhost:4300/assets/json/data_list.json