Last active
September 4, 2019 06:00
-
-
Save wushan/73be5b3fcef1e148219812a9031e2336 to your computer and use it in GitHub Desktop.
Rewrite Ruls for Vue.js SPA on IIS
This file contains 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
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="backend" stopProcessing="true"> | |
<match url="^(backend)(.*)$" /> | |
<action type="None" /> | |
</rule> | |
<rule name="Vuejs rules" 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="/" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
A little late but I needed to do this today so am logging it here for the future.
Create a web.config file in the folder of app and paste it in.
You may need to add if there is not an existing file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
could you tell me how to use it ?
when I code in my web.config file, the errors have happened.
My problem is that my vue spa page deployment on iis, I cannot refresh,if did it ,404 will happend