Last active
August 7, 2017 03:25
-
-
Save poychang/9a35ce967f6cc7c7714ff55544569821 to your computer and use it in GitHub Desktop.
[部屬含有路由機制的 Angular 至 IIS 的虛擬目錄/應用程式] 這用於將 Angular 網頁掛在某個 IIS 網站下 #angular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>SPA - Virtual Directory</title> | |
<base href="/VirtualDirectory/"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" type="image/x-icon" href="favicon.ico"> | |
</head> | |
<body> | |
<app-root>Loading...</app-root> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="SPA" stopProcessing="true"> | |
<match url="/.*" /> | |
<action type="Rewrite" url="/VirtualDirectory/" /> | |
<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