vue router history mode in iis

Chobits

https://www.iis.net/learn/ext...


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="api" stopProcessing="true">
          <match url="api/.*" />
          <action type="Rewrite" url="http://xxxx/{R:0}" logRewrittenUrl="true" />
        </rule>
        <rule name="fixhtml5mode" stopProcessing="true">
          <match url="^((?!blog)(?!api).)*$" />
          <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>
    <staticContent>
      <mimeMap fileExtension=".woff2" mimeType="application/x-font-woff" />
    </staticContent>
  </system.webServer>
</configuration>

static folder

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <staticContent>
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
    </staticContent>
  </system.webServer>
</configuration>

index.html no-cache

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

  <location path="index.html">
    <system.webServer>
      <httpProtocol>
        <customHeaders>
          <add name="Cache-Control" value="no-cache" />
        </customHeaders>
      </httpProtocol>
    </system.webServer>
  </location>

</configuration>
阅读 2.5k

Chobits
吸收美国氮磷钾

保卫骡博 Chobits#3780

7.3k 声望
168 粉丝
0 条评论

保卫骡博 Chobits#3780

7.3k 声望
168 粉丝
文章目录
宣传栏