IIS处理程序在处理htm请求时排除目录 [英] IIS Handlers exclude a Directory when processing htm requests

查看:99
本文介绍了IIS处理程序在处理htm请求时排除目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过web.config文件使用以下处理程序.我现在面临的问题是我在特定目录中有.htm文件,需要从此处理程序中将其排除.有办法吗?

I am using the below handler in by web.config file. The problem i am now faced with is that i have .htm files in a particular directory that i need to be excluded from this handler. Is there a way to do this?

<add name="ASPNETLikeHandler-Classichtm" path="*.htm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" requireAccess="Script" preCondition="classicMode" />

因此,当以某个目录为目标时,我希望.htm文件的行为与默认情况相同. 这有可能吗?

So when a certain directory is targeted i want the .htm files to behave as they would by default. Is this even possible?

推荐答案

将web.config文件放入您要忽略的目录中并删除处理程序

Place a web.config file into the directory you want ignored and remove the handler

<system.webServer>
     <handlers>
       <remove name="ASPNETLikeHandler-Classichtm" />
     </handlers>
</system.webServer>

这篇关于IIS处理程序在处理htm请求时排除目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆