Saturday, November 30, 2019

Web Config file for Angular App



Web Config File for Angular App

when you release Angular app on production then web.config file is needed for URL Rewriting .
you can add a text file and change it file type as configuration web.config

web.Config

<?xml version="1.0" encoding="utf-8"?>
<configuration>

<system.webServer>
  <rewrite>
    <rules>
      <rule name="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">
      </rule>
    </rules>
  </rewrite>
</system.webServer>
</configuration>

Note : if you are running IIS 10 then remove   <match url=".*" />  as <match url="." />


@ShubhTechnoExpet on Facebook page .

No comments:

Post a Comment