gpt4 book ai didi

iis - 使用IIS以纯文本形式提供不带扩展名的文件

转载 作者:行者123 更新时间:2023-12-04 13:19:10 27 4
gpt4 key购买 nike

我尝试使用IIS: How to serve a file without extension?的答案

 <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".*" mimeType="text/plain" />
</staticContent>
</system.webServer>
</configuration>

这使我可以定位文件,但不能访问它

HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

最佳答案

尝试这个

<staticContent>
<mimeMap fileExtension="." mimeType="text/html" />
</staticContent>

关于iis - 使用IIS以纯文本形式提供不带扩展名的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27908898/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com