Direct Angled Rotation Problem

0

I published the Angular project on a machine with IIS, but when I try to access the link with a route it directly displays a 404 error, for example " link but if you access the url link "it loads normally, and if it is not logged in the system correctly redirects to login, I can navigate on any route normally through the angular, but the problem only occurs when I go directly through the browser. Is there any configuration in IIS or Angular that allows to access the routes directly by the browser?

    
asked by anonymous 17.09.2018 / 15:31

1 answer

1

According to the documentation you have to rewrite a file.

Try to re-run the web.config file

<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="/index.html" />
      </rule>
    </rules>
  </rewrite>
</system.webServer>
    
17.09.2018 / 15:34