Single page progressive web application on Internet Information Services.
- Download and install the URL Rewrite module
- Add this
web.config
to your application root directory - Profit 🎉
Single page progressive web application on Internet Information Services.
web.config
to your application root directory<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<!-- HTTPS --> | |
<rule name="HTTP 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}" redirectType="Permanent" /> | |
</rule> | |
<!-- SPA --> | |
<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" /> | |
</conditions> | |
<action type="Rewrite" url="/index.html" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |