VUE IIS 重定向

1.在IIS 安装 web平台安装程序

下载连接https://www.microsoft.com/web/downloads/platform.aspx

2.安装 URL重定向 工具

3.创建web.config 文件放在站点下

xml 内容

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Handle History Mode and custom 404/500" 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>

版权声明:本文为qq_34894585原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。