web.config 792 B

123456789101112131415161718192021222324
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3. <system.webServer>
  4. <defaultDocument enabled="true">
  5. <files>
  6. <clear/>
  7. <add value="index.html" />
  8. </files>
  9. </defaultDocument>
  10. <!-- 如果没有后缀则在后面加index.html -->
  11. <rewrite>
  12. <rules>
  13. <rule name="Add index.html" stopProcessing="true">
  14. <match url="(.*)/$" />
  15. <conditions>
  16. <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  17. <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  18. </conditions>
  19. <action type="Rewrite" url="{R:1}/index.html" />
  20. </rule>
  21. </rules>
  22. </rewrite>
  23. </system.webServer>
  24. </configuration>