Last updated 6 months ago
自定義錯誤頁面,可讓用戶請求錯誤的資源或不存在的網頁時,顯示非預設的錯誤畫面,提高用戶的使用者體驗
站點管理
站點設定
自定義錯誤 > 新增錯誤頁面
代碼
目前支援的http code:400、403、429、500、502、504
400、403、429、500、502、504
類型
顯示內容
可輸入文字及變數
URL跳轉
跳轉至指定URL,例如: https://example.com/403error.html
https://example.com/403error.html
JavaScript
例如:
<html> <body> <meta charset="UTF-8"> <title>Hello</title> <script> alert("This is error page") </script> <p> 403錯誤<br />$hostname<br />$remote_ip </p> </body> </html>
內容
支援以下變數,其餘依照類型設定
$hostname 顯示訪客訪問到的節點名稱
$hostname
$remote_ip 顯示訪客ip
$remote_ip