dee*_*hao 19 security iis-7 web-config httphandler
如果我认为可能,我如何修改我的web.config以使子目录静态 - 内部文件只会作为静态文件处理,即使它的名称是"aspx"或其他什么?谢谢.
Kev*_*Kev 44
将以下内容添加到web.config包含您希望作为静态内容提供的文件的文件夹中的文件中:
<configuration>
<system.webServer>
<handlers>
<clear />
<add
name="StaticFile"
path="*" verb="*"
modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule"
resourceType="Either"
requireAccess="Read" />
</handlers>
<staticContent>
<mimeMap fileExtension=".*" mimeType="application/octet-stream" />
</staticContent>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
28020 次 |
| 最近记录: |