Nik*_*son 0 web-config typescript angular
我知道我不是第一个在这里问这个问题的人,我可以找到很多与我的问题相关的解决方案,但没有解决我的问题。,
图片 :
网页配置
<system.webServer>
<rewrite>
<rules>
<rule name="AngularJS Routes" 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="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
索引.html
<base href ="/eCommerceWebsite/">
Run Code Online (Sandbox Code Playgroud)
IIS 中的物理路径
C:\eCommerceWebsite
Run Code Online (Sandbox Code Playgroud)
谁能告诉我我在哪里犯了错误以及我需要在这里改变什么
编辑 :
图1:
图 2:
更新了 web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="AngularJS Routes" 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="/eCommerceWebsite" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
编辑2:
| 归档时间: |
|
| 查看次数: |
4490 次 |
| 最近记录: |