I was facing issue in routing after I hosted my Angular 8 application on IIS. Initially I was only working on Chrome and there was IE compatibility issue which I fixed by following https://github.com/angular/angular-cli/issues/14455
Then I fixed the issue with routing in Chrome by following Get Angular2 routing working on IIS 7.5
Now the thing is I face the same issue I faced on Chrome in IE.
As you can see in the image above, I am accessing the application hosted in the IIS but the URL for home page is different for IE and Chrome. Please find my web.config below :
<?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="./" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Index.html :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>test</title>
<base href="./" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" href="styles.39b1e75bbbe936737c09.css"></head>
<body>
<app-root></app-root>
<script src="runtime-es2015.858f8dd898b75fe86926.js" type="module"></script><script src="polyfills-es2015.2aa54f736a6dab369b77.js" type="module"></script><script src="runtime-es5.741402d1d47331ce975c.js" nomodule></script><script src="polyfills-es5.295ea8bc5f78de650878.js" nomodule></script><script src="scripts.e84dbffa93eee937834f.js"></script><script src="main-es2015.84b45d5a04fc8fb79ee4.js" type="module"></script><script src="main-es5.a33c40a78828de82c0fb.js" nomodule></script></body>
</html>
When I reload the page or manually try to navigate the route, I get 404 error.
I am not familiar with URL rewrite and not sure if we should have a specific rule for IE?