<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>康盛博客 &#187; hosts 本地解析</title>
	<atom:link href="http://www.helpphp.cn/tag/hosts-%e6%9c%ac%e5%9c%b0%e8%a7%a3%e6%9e%90/feed" rel="self" type="application/rss+xml" />
	<link>http://www.helpphp.cn</link>
	<description></description>
	<lastBuildDate>Wed, 08 Sep 2010 07:19:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>hosts不能解析指定域名</title>
		<link>http://www.helpphp.cn/1047</link>
		<comments>http://www.helpphp.cn/1047#comments</comments>
		<pubDate>Sun, 07 Feb 2010 09:07:40 +0000</pubDate>
		<dc:creator>helpuser</dc:creator>
				<category><![CDATA[天涯足迹]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[hosts 本地解析]]></category>

		<guid isPermaLink="false">http://www.helpphp.cn/?p=1047</guid>
		<description><![CDATA[最近在安装一个博客，由于新注册的域名还没有通过备案，所以在本地进行测试时使用了hosts本地DNS解析功能，但是很奇怪的是，本地解析hosts文件不起作用！
windows下hosts文件路径：C:\WINDOWS\system32\drivers\etc
hosts可用记事本打开
解决方法如下：
1.ipconfig /flushdns //清空本地DNS缓存
2.添加%windir%\system32\DRIVERS\etc\hosts 至环境变量 //问题的关键
3.重新启动浏览器，再试试
查看本地DNS缓存的方法：
ipconfig /displaydns
格式如下所示:
 video.baidu.com
 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
 Record Name . . . . . : video.baidu.com
 Record Type . . . . . : 5
 Time To Live  . . . . : 17
 Data Length . . . . . : 4
 Section . . . . . . . : Answer
 [...]]]></description>
			<content:encoded><![CDATA[<p>最近在安装一个博客，由于新注册的域名还没有通过备案，所以在本地进行测试时使用了hosts本地DNS解析功能，但是很奇怪的是，本地解析<strong>hosts文件</strong>不起作用！</p>
<p>windows下hosts文件路径：C:\WINDOWS\system32\drivers\etc<br />
hosts可用记事本打开</p>
<p>解决方法如下：<br />
1.ipconfig /flushdns //清空本地DNS缓存<br />
2.添加%windir%\system32\DRIVERS\etc\hosts 至环境变量 //问题的关键<br />
3.重新启动浏览器，再试试</p>
<p>查看本地DNS缓存的方法：<br />
ipconfig /displaydns<br />
格式如下所示:<br />
 video.baidu.com<br />
 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 Record Name . . . . . : video.baidu.com<br />
 Record Type . . . . . : 5<br />
 Time To Live  . . . . : 17<br />
 Data Length . . . . . : 4<br />
 Section . . . . . . . : Answer<br />
 CNAME Record  . . . . : video.n.shifen.com</p>
<p> zhidao.baidu.com<br />
 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 Record Name . . . . . : zhidao.baidu.com<br />
 Record Type . . . . . : 5<br />
 Time To Live  . . . . : 69<br />
 Data Length . . . . . : 4<br />
 Section . . . . . . . : Answer<br />
 CNAME Record  . . . . : iknow.baidu.com</p>
<p  class="related_post_title">无相关日志，你可以查看以下文章</p><ul class="related_post"><li style="list-style:none;"><a style="font-size:14px; color:#000000;" href="http://www.helpphp.cn/276" title="PHP包含文件语句详解-include_once,require_once,与include,require的区别">PHP包含文件语句详解-include_once,require_once,与include,require的区别</a></li><li style="list-style:none;"><a style="font-size:14px; color:#000000;" href="http://www.helpphp.cn/1325" title="awk的那些事">awk的那些事</a></li><li style="list-style:none;"><a style="font-size:14px; color:#000000;" href="http://www.helpphp.cn/670" title="网站公告">网站公告</a></li><li style="list-style:none;"><a style="font-size:14px; color:#000000;" href="http://www.helpphp.cn/877" title="google的退出">google的退出</a></li><li style="list-style:none;"><a style="font-size:14px; color:#000000;" href="http://www.helpphp.cn/497" title="php静态属性和静态方法">php静态属性和静态方法</a></li><li style="list-style:none;"><a style="font-size:14px; color:#000000;" href="http://www.helpphp.cn/566" title="PHP5 开发多任务应用程序">PHP5 开发多任务应用程序</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.helpphp.cn/1047/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
