<?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; 301</title>
	<atom:link href="http://www.weijingtai.com/tag/301/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.weijingtai.com</link>
	<description>Url rewrite 伪静态规则使用收集</description>
	<lastBuildDate>Mon, 14 Jun 2010 03:30:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rewrite实现301 Redirect(永久转向)</title>
		<link>http://www.weijingtai.com/2009/04/19/isapi-rewrite-301-redirect/</link>
		<comments>http://www.weijingtai.com/2009/04/19/isapi-rewrite-301-redirect/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 16:20:48 +0000</pubDate>
		<dc:creator>衣不如新</dc:creator>
				<category><![CDATA[isapi-rewrite]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[永久定向]]></category>
		<category><![CDATA[重定向]]></category>

		<guid isPermaLink="false">http://www.weijingtai.com/?p=75</guid>
		<description><![CDATA[301转向(或叫301重定向，301跳转)是当用户或搜索引擎向网站服务器发出浏览请求时，服务器返回的HTTP数据流中头信息(header)中的状态码的一种，表示本网页永久性转移到另一个地址。301重定向有多种方法，这里着重介绍如何通过 isapi-write来实现，注意2.x版本和3.x版本略有不同]]></description>
			<content:encoded><![CDATA[<p>什么是301 Redirect</p>
<blockquote><p>301转向(或叫301重定向，301跳转)是当用户或搜索引擎向网站服务器发出浏览请求时，服务器返回的HTTP数据流中头信息(header)中的状态码的一种，表示本网页永久性转移到另一个地址。其它常见的状态码还包括，200表示一切正常，404网页找不到，302暂时转向，等等。页面永久性移走（301重定向）是一种非常重要的“自动转向”技术。301重定向可促进搜索引擎优化效果从搜索引擎优化角度出发，301重定向是网址重定向最为可行的一种办法。当网站的域名发生变更后，搜索引擎只对新网址进行索引，同时又会把旧地址下原有的外部链接如数转移到新地址下，从而不会让网站的排名因为网址变更而收到丝毫影响。同样，在使用301永久性重定向命令让多个域名指向网站主域时，亦不会对网站的排名产生任何负面影响。</p></blockquote>
<p>301重定向有多种方法，这里着重介绍如何通过 isapi-write来实现，注意2.x版本和3.x版本略有不同,多数情况下使用2.x版本，除非有特别说明3.x极少用到，规则文件保存为httpd.ini上传在网站根目录。<br />
<span id="more-75"></span><br />
<strong>===========将weijingtai.com转移到</strong><a href="http://www.weijingtai.com"><strong>www.weijingtai.com</strong></a><strong>上================</strong><br />
# =====ISAPI_Rewrite 2.x====#</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
# Collected By weijingtai.com
RepeatLimit 32
RewriteCond Host: ^weijingtai\.com$
RewriteRule (.*) http\://www\.weijingtai\.com$1 [I,RP]</pre></div></div>

<p><strong>===========将</strong><a href="http://www.sohu.com"><strong>www.sohu.com</strong></a><strong>转移到</strong><a href="http://www.weijingtai.com"><strong>www.weijingtai.com</strong></a><strong>上================</strong><br />
# =====ISAPI_Rewrite 2.x====</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
# Collected By weijingtai.com
RepeatLimit 32
RewriteCond Host: ^www\.sohu\.com$
RewriteRule (.*) http\://www\.weijingtai\.com$1 [I,RP]</pre></div></div>

<p><strong>===========不同页面间的301转向</strong><strong>================</strong><br />
# =====ISAPI_Rewrite 2.x====</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
# Collected By weijingtai.com
RepeatLimit 32
RewriteRule ^/oldpage.html$ http://www.weijintgai.com/newpage.html[I,O,RP,L]</pre></div></div>

<p>对应的3.x的规则，（一般不用）<br />
# =====ISAPI_Rewrite 3.x====</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
# Collected By weijingtai.com
RepeatLimit 32
RewriteCond %{HTTP:Host} ^weijingtai\.com$
RewriteRule (.*) http\://www\.weijingtai\.com$1 [NC,R=301]</pre></div></div>

<p># =====ISAPI_Rewrite 3.x====</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
# Collected By weijingtai.com
RepeatLimit 32
RewriteCond %{HTTP:Host} ^www\.sohu\.com$
RewriteRule (.*) http\://www\.weijingtai\.com$1 [NC,R=301]</pre></div></div>

<p># =====ISAPI_Rewrite 3.x====</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
# Collected By weijingtai.com
RepeatLimit 32
RewriteRule ^/oldpage.html$ http://www.weijintgai.com/newpage.html[NC,L,R=301,O]</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.weijingtai.com/2009/04/19/isapi-rewrite-301-redirect/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

