我想通過鏈接的CSS樣式表在IIS7中自定義錯誤頁面的樣式。IIS CustErr CSS問題
This Works。
<html><head><title>404 - File or directory not found.</title>
<LINK href="http://stage.mysite.com/custErr/css/style.css" rel="stylesheet" type="text/css">
</head><body>Page Not Found</body></html>
我創建了一個mysite
一個虛擬目錄名爲custErr
包含所需的CSS和圖像。
而是使之更易於部署,我想有它相對的是這樣的...
<html><head><title>404 - File or directory not found.</title>
<LINK href="../css/style.css" rel="stylesheet" type="text/css">
</head><body>Page Not Found</body></html>
試圖在這之後我發現,相對路徑似乎並沒有工作。實際上,c:\inetpub\custerr\en-US
文件夾中的樣式表也不起作用。
這些頁面從哪裏提供?
有沒有更簡單的方法來做到這一點?
因此,我不必修改每個環境的每條絕對路徑?