<?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>长沙我心飞扬seo &#187; htaccess 301重定向</title>
	<atom:link href="http://www.wxfy.net/tag/htaccess-301%e9%87%8d%e5%ae%9a%e5%90%91/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wxfy.net</link>
	<description>长沙seo,长沙网站建设,长沙网站优化首选我心飞扬seo</description>
	<lastBuildDate>Thu, 22 Jul 2010 13:09:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache .htaccess 301永久重定向方法</title>
		<link>http://www.wxfy.net/apache-htaccess-301/</link>
		<comments>http://www.wxfy.net/apache-htaccess-301/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 08:16:24 +0000</pubDate>
		<dc:creator>阿非</dc:creator>
				<category><![CDATA[网站建设]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[301永久重定向]]></category>
		<category><![CDATA[301重定向]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache 301]]></category>
		<category><![CDATA[htaccess 301重定向]]></category>

		<guid isPermaLink="false">http://www.wxfy.net/?p=186</guid>
		<description><![CDATA[Apache .htaccess 301永久重定向方法的前提是服务器空间必须支持Apache的Rewrite功能。
一：
用301将不带WWW的域名重定向，如：wxfy.net 301转向到 www.wxfy.net
rewriteEngine on
rewriteCond %{http_host} ^wxfy.net[NC]
rewriteRule ^(.*)$ http://www.wxfy.net/$1 [R=301,L]
二：
301重定向还可以将绑定的其他域名重定向到主域名，例如将 wxfy.net ,www.wxfy.net 301转向到 anotherdomain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^wxfy.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.wxfy.net$
RewriteRule ^(.*)$ http://anotherdomain.com/$1 [R=301,L]
三：
301还可以将index.html、index.php等文件进行重定向
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://wxfy.net/ [R=301,L]
以上方法是从网上搜集来的，因为有个网站需要换域名，所以要进行301永久重定向。 .htaccess代码如下：
RewriteEngine on
RewriteCond %{HTTP_HOST} ^taiguorenyao.cn$ [OR]
RewriteCond %{HTTP_HOST} ^www.taiguorenyao.cn$
RewriteRule ^(.*)$ http://renyao.iyouwu.com/$1 [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^taiguorenyao.cn$ [OR]
RewriteCond %{HTTP_HOST} ^www.taiguorenyao.cn$
RewriteRule ^(.*)$ http://renyao.iyouwu.com/$1 [R=301,L]
您可以尝试一下打开原来的网址试试。
]]></description>
			<content:encoded><![CDATA[<p>Apache .htaccess 301永久重定向方法的前提是服务器空间必须支持Apache的Rewrite功能。</p>
<p>一：<br />
用301将不带WWW的域名重定向，如：wxfy.net 301转向到 www.wxfy.net</p>
<p>rewriteEngine on<br />
rewriteCond %{http_host} ^wxfy.net[NC]<br />
rewriteRule ^(.*)$ http://www.wxfy.net/$1 [R=301,L]</p>
<p><span id="more-186"></span>二：<br />
301重定向还可以将绑定的其他域名重定向到主域名，例如将 wxfy.net ,www.wxfy.net 301转向到 anotherdomain.com</p>
<p>RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^wxfy.net$ [OR]</p>
<p>RewriteCond %{HTTP_HOST} ^www.wxfy.net$<br />
RewriteRule ^(.*)$ http://anotherdomain.com/$1 [R=301,L]</p>
<p>三：<br />
301还可以将index.html、index.php等文件进行重定向<br />
RewriteEngine on<br />
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/<br />
RewriteRule ^index\.php$ http://wxfy.net/ [R=301,L]</p>
<p>以上方法是从网上搜集来的，因为有个网站需要换域名，所以要进行301永久重定向。 .htaccess代码如下：</p>
<blockquote><p>RewriteEngine on</p>
<p>RewriteCond %{HTTP_HOST} ^taiguorenyao.cn$ [OR]</p>
<p>RewriteCond %{HTTP_HOST} ^www.taiguorenyao.cn$</p>
<p>RewriteRule ^(.*)$ http://renyao.iyouwu.com/$1 [R=301,L]</p></blockquote>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 343px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">RewriteEngine on</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 343px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">RewriteCond %{HTTP_HOST} ^taiguorenyao.cn$ [OR]</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 343px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">RewriteCond %{HTTP_HOST} ^www.taiguorenyao.cn$</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 343px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">RewriteRule ^(.*)$ http://renyao.iyouwu.com/$1 [R=301,L]</div>
<p>您可以尝试一下打开原来的网址试试。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wxfy.net/apache-htaccess-301/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
