在线精品免费视频,91免费国产高清在线,91久久精品国产一区二区,男人在线网站,欧洲视频一区,最新国产精品亚洲,狠狠色狠色综合曰曰

萬企互聯(lián)-專注高端網(wǎng)站建設(shè)
掃描關(guān)注萬企互聯(lián)微信公眾賬號

掃一掃微信二維碼

服務(wù)器IIS下自定義錯(cuò)誤頁面配置的兩種方式

系統(tǒng)維護(hù)?2022/2/14? 386

1、首先進(jìn)入你的網(wǎng)站主頁,找到【錯(cuò)誤頁】(注意是IIS下的錯(cuò)誤頁不是.NET錯(cuò)誤頁),雙擊【錯(cuò)誤頁】

2、這樣就進(jìn)入了錯(cuò)誤頁面,點(diǎn)擊【編輯】或者雙擊狀態(tài)代碼行,打開“編輯自定義錯(cuò)誤頁面”

3、填寫狀態(tài)碼,響應(yīng)操作處選擇第二項(xiàng)【在此網(wǎng)站上執(zhí)行】,輸入U(xiǎn)RL

4、查看錯(cuò)誤頁面相對根目錄的位置,按照示例填寫就可以的。然后依次設(shè)置其它頁面

5、當(dāng)然還可以通過修改配置文件(web.config)來設(shè)置自定義頁面,它和上面的配置是對應(yīng)的。


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Custom">
            <remove statusCode="502" subStatusCode="-1" />
            <remove statusCode="501" subStatusCode="-1" />
            <remove statusCode="500" subStatusCode="-1" />
            <remove statusCode="412" subStatusCode="-1" />
            <remove statusCode="406" subStatusCode="-1" />
            <remove statusCode="405" subStatusCode="-1" />
            <remove statusCode="403" subStatusCode="-1" />
            <remove statusCode="401" subStatusCode="-1" />
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="401" prefixLanguageFilePath="" path="/ErrorPages/401.html" responseMode="ExecuteURL" />
            <error statusCode="404" prefixLanguageFilePath="" path="/ErrorPages/404.html" responseMode="ExecuteURL" />
            <error statusCode="403" prefixLanguageFilePath="" path="/ErrorPages/403.html" responseMode="ExecuteURL" />
            <error statusCode="405" prefixLanguageFilePath="" path="/ErrorPages/405.html" responseMode="ExecuteURL" />
            <error statusCode="406" prefixLanguageFilePath="" path="/ErrorPages/406.html" responseMode="ExecuteURL" />
            <error statusCode="412" prefixLanguageFilePath="" path="/ErrorPages/412.html" responseMode="ExecuteURL" />
            <error statusCode="500" prefixLanguageFilePath="" path="/ErrorPages/500.html" responseMode="ExecuteURL" />
            <error statusCode="501" prefixLanguageFilePath="" path="/ErrorPages/501.html" responseMode="ExecuteURL" />
            <error statusCode="502" prefixLanguageFilePath="" path="/ErrorPages/502.html" responseMode="ExecuteURL" />
            <error statusCode="503" prefixLanguageFilePath="" path="/ErrorPages/503.html" responseMode="ExecuteURL" />
        </httpErrors>
    </system.webServer>
</configuration>


<error  statusCode="404"  prefixLanguageFilePath=""  path="/ErrorPages/404.html" responseMode="ExecuteURL" />

有兩個(gè)重要的點(diǎn):狀態(tài)碼(statusCode)和路徑(path),填寫的時(shí)候要細(xì)心。


文章關(guān)鍵詞
服務(wù)器
IIS
萬企互聯(lián) 咸陽網(wǎng)站建設(shè) 萬企微信 IDC主機(jī)測評 域名轉(zhuǎn)發(fā)系統(tǒng) IP地址查詢 萬企工具 超越彼岸BEYOND 六佰號 品控技術(shù)網(wǎng) TOP圖標(biāo)庫