问题:
当用户发生DNS故障时,如何重定向到搜索引擎?
作者:Vladimir Sousa和Jeff Richmond,Cisco TAC工程师。
环境:WSA
症状:当用户默认键入不存在的URL(无法进行DNS解析)时,WSA将返回类似于以下内容的通知页面:
This Page Cannot Be Displayed
------------------------------------------------------------------------------------------------
The host name resolution (DNS lookup) for this host name ( temple.edu ) has failed. The Internet
address may be misspelled or obsolete, the host ( temple.edu ) may be temporarily unavailable,
or the DNS server may be unresponsive.
Please check the spelling of the Internet address entered. If it is correct, try this request later.
If you have questions, or if this condition persists, please contact your corporate network
administrator and provide the codes shown below.
------------------------------------------------------------------------------------------------
Notification codes: (1, DNS_FAIL, temple.edu)
一些客户希望能够将用户重定向到搜索引擎。这与Windows Live Search执行的操作类似。
通过将默认通知页面更改为类似内容,可以将用户请求重定向至不存在的URL:
对于Windows Live Search:
<html>
<head>
<title> Notification Page </title>
<meta name="author" content="Cisco systems">
<meta name="description" content="Notification Page">
<meta http-equiv="refresh" content="0;url=http://search.live.com/results.aspx?FORM=DNSAS&q=%H">
</head>
<body>
<p>
</body>
</html>
对于Google:
<html>
<head>
<title> Notification Page </title>
<meta name="author" content="Cisco systems">
<meta name="description" content="Notification Page">
<meta http-equiv="refresh" content="0;url=http://www.google.com/search?hl=en&q=%H">
</head>
<body>
<p>
</body>
</html>
修改DNS_FAIL HTML文件的步骤如下:
- 通过FTP连接到WSA - ftp admin@<WSA_host_name_or_IP>
- 浏览至configuration/eun/en。
- 下载并编辑ERR_DNS_FAIL页面或创建新的ERR_DNS_FAIL页面。
- 将编辑的ERR_DNS_FAIL页面上传到configuration/eun/en文件夹。
- 上传后,登录CLI界面。然后使用“使用自定义EUN页面”(Use Custom EUN pages)选项;如果已启用此选项,请使用“刷新EUN页面”(Refresh EUN pages)命令使上传的自定义EUN页面生效。此选项在CLI命令—> advancedproxyconfig > EUN下可用。