I am deploying an Angular app on an IIS server.
The web is displayed correctly, but when I refresh the browser it gives me a 404/500 (depends on base attribute setting and app.config) error.
In my index.html I have:
<base href = "/">
And my web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="true" />
<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="index.html" />
</rule>
</rules>
</rewrite>
<!--<defaultDocument>
<files>
<remove value="index.html" />
<add value="index.html" />
</files>
</defaultDocument>-->
</system.webServer>
</configuration>
When in the browser I call the path, it looks correctly:
http://miweb.es/WebApp/index.html
In the angular router I have goes it to redirect me and it does well to this route:
http://miweb.es/WebApp/index.html/download
But, at this moment if I browser refresh it gives me the error 404/500 (depends on base attribute setting and app.config).
What am I doing wrong ?, thanks