ANT VUE 反向代理web.config配置,解决F5刷新问题和404问题
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="api" enabled="true" patternSyntax="Wildcard" stopProcessing="true"> <match url="*api/*" /> <action type="Rewrite" url="http://10.0.10.123:8083/api/{R:2}" /> </rule> <rule name="hubs" enabled="true" patternSyntax="Wildcard" stopProcessing="true"> <match url="*hubs/*" /> <action type="Rewrite" url="http://10.0.10.123:8083/hubs/{R:2}" /> </rule> <rule name="index" stopProcessing="true"> <match url="^((?!(api)).)*$" /> <conditions> <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>