IIS7 网站没有的目录文件跳转到404页面

web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors>
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/404.html" responseMode="ExecuteURL" />
        </httpErrors>
    </system.webServer>
</configuration>

 

效果图:
IIS7 网站没有的目录文件跳转到404页面_第1张图片
 

 

你可能感兴趣的:(IIS7 网站没有的目录文件跳转到404页面)