Home Operation and Maintenance Windows Operation and Maintenance Detailed introduction on how to set a directory to prohibit script execution in Win2008 r2 IIS7.5

Detailed introduction on how to set a directory to prohibit script execution in Win2008 r2 IIS7.5

Jun 02, 2017 am 09:39 AM

This article mainly introduces the method of setting a directory to prohibit the execution of scripts in Win2008 r2 IIS7.5. Friends who need it can refer to it.

Refer to Wanwang. The server Windows2008 IIS7.5 can make settings to disable scripts. Execution method -------- You need to disable the script execution permission of a certain directory. You can create a web.config file in the directory where you want to disable the script execution permission and add the following code in it:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <remove name="ASPClassic" />
      <remove name="PHP-FastCGI" />
      <remove name="ASPNET-ISAPI-1.1-AXD" />
      <remove name="ASPNET-ISAPI-1.1-HttpRemotingHandlerFactory-rem" />
      <remove name="ASPNET-ISAPI-1.1-HttpRemotingHandlerFactory-soap" />
      <remove name="ASPNET-ISAPI-1.1-PageHandlerFactory" />
      <remove name="ASPNET-ISAPI-1.1-SimpleHandlerFactory" />
      <remove name="ASPNET-ISAPI-1.1-WebServiceHandlerFactory" />
      <remove name="AssemblyResourceLoader-Integrated" />
      <remove name="AXD-ISAPI-2.0" />
      <remove name="AXD-ISAPI-2.0-64" />
      <remove name="HttpRemotingHandlerFactory-rem-Integrated" />
      <remove name="HttpRemotingHandlerFactory-rem-ISAPI-2.0" />
      <remove name="HttpRemotingHandlerFactory-rem-ISAPI-2.0-64" />
      <remove name="HttpRemotingHandlerFactory-soap-Integrated" />
      <remove name="HttpRemotingHandlerFactory-soap-ISAPI-2.0" />
      <remove name="HttpRemotingHandlerFactory-soap-ISAPI-2.0-64" />
      <remove name="PageHandlerFactory-Integrated" />
      <remove name="PageHandlerFactory-ISAPI-2.0" />
      <remove name="PageHandlerFactory-ISAPI-2.0-64" />
      <remove name="Perl-CGI" />
      <remove name="Perl-ISAPI" />
      <remove name="rules-64-ISAPI-2.0" />
      <remove name="rules-Integrated" />
      <remove name="rules-ISAPI-2.0" />
      <remove name="SecurityCertificate" />
      <remove name="SimpleHandlerFactory-Integrated" />
      <remove name="SimpleHandlerFactory-ISAPI-2.0" />
      <remove name="SimpleHandlerFactory-ISAPI-2.0-64" />
      <remove name="svc-Integrated" />
      <remove name="svc-ISAPI-2.0" />
      <remove name="svc-ISAPI-2.0-64" />
      <remove name="TraceHandler-Integrated" />
      <remove name="TRACEVerbHandler" />
      <remove name="WebAdminHandler-Integrated" />
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="WebServiceHandlerFactory-ISAPI-2.0" />
      <remove name="WebServiceHandlerFactory-ISAPI-2.0-64" />
      <remove name="xoml-64-ISAPI-2.0" />
      <remove name="xoml-Integrated" />
      <remove name="xoml-ISAPI-2.0" />
    </handlers>
  </system.webServer>
</configuration>
Copy after login

After saving, the folder and subcontainers are set to have only read permissions, but no script execution permissions. If you want to restore script permissions, just deletethe web.config file in this directory.

The above is the detailed content of Detailed introduction on how to set a directory to prohibit script execution in Win2008 r2 IIS7.5. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)