I deployed my dot net core 3.1 api and angular 9 app into IIS. Api works well. When I hit the url for login it works well and took me into my Dashboard. http://192.168.15.12:8020/ePortal/home.
After that when I click on my other component say I wants to go to Color. When I click on Color the urls is http://192.168.15.12:8020/home/color-details instead of http://192.168.15.12:8020/ePortal/home/color-details that's why it shows 404(not found) error.
I've build the production using ng build --prod --base-href /ePortal/ and also add an web.config to rewrite the 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="/ePortal/" />
<!--<action type="Rewrite" url="/" /> /ePortal/-->
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
I can't identify the problem. Help please