Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <rule name="SPA Routes" stopProcessing="true">
- <match url=".*" />
- <conditions logicalGrouping="MatchAll">
- <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
- <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
- <!-- under the /api directory -->
- <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
- </conditions>
- <!-- rewrite it to /index.html -->
- <action type="Rewrite" url="/index.html" />
- </rule>
- <rule name="HTTP/S to HTTPS Redirect" enabled="true" stopprocessing="true">
- <match url="(.*)"/>
- <conditions logicalgrouping="MatchAny">
- <add input="{SERVER_PORT_SECURE}" pattern="^0$"/>
- </conditions>
- <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}/index.html" redirecttype="Permanent"/>
- </rule>
Add Comment
Please, Sign In to add comment