Skip to content

Instantly share code, notes, and snippets.

@doggy8088
Created January 17, 2017 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save doggy8088/68eed089b53ff50e81314ba47d92e87a to your computer and use it in GitHub Desktop.
Save doggy8088/68eed089b53ff50e81314ba47d92e87a to your computer and use it in GitHub Desktop.
將 Angular 2 含有路由機制的 SPA 網頁應用程式部署到 IIS 網站伺服器
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="SPA" stopProcessing="true">
<match url=".*" />
<action type="Rewrite" url="/" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment