<?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; rewrite</title>
	<atom:link href="http://www.zhcn.org/tag/rewrite/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zhcn.org</link>
	<description>喜欢发布一些自己喜爱的工具软件</description>
	<lastBuildDate>Sat, 31 Dec 2011 13:59:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>论坛换域名时需要用的Rewrite规则，很实用</title>
		<link>http://www.zhcn.org/232/</link>
		<comments>http://www.zhcn.org/232/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 15:40:45 +0000</pubDate>
		<dc:creator>shuxin</dc:creator>
				<category><![CDATA[vbulletin&xenforo]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[vbb]]></category>

		<guid isPermaLink="false">http://www.zhcn.org/?p=232</guid>
		<description><![CDATA[近期一个行业论坛启动了新的域名 由于原有的论坛为vbseo，并且采用了VBSEO优化，新的论坛停用了VBSEO，所以域名和地址样式都变了，致使搜索引擎收录的很多页面都成了错误。 虽然可以通过自定义404错误页面，来301跳转到新的域名，但只能跳到新域名首页。 如果要想让原有的vbb贴子地址和新的域名地址对应，Apache的Rewrite的伟大就体现出来了，下面是国外朋友提供的几个规划。可惜，在国内百度求助上，挂了好久，没有人理，挂到国外，5分钟就解决了。 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.a\.com$ RewriteRule ^thread/.*/(.*)/$ http://www.b.com/showthread.php?t=$1 [R=301,L] RewriteRule ^archive/(.*)$ http://www.b.com/archive/index.php/$1 RewriteRule ^forum/(.*)/$ http://www.b.com/forumdisplay.php?f=$1 RewriteRule ^announcement/.*/(.*)/$ http://www.b.com/announcement.php?a=$1 [R=301,L] 说明： 1、新的论坛是vbulletin，后面的“showthread.php?t=”等语名，要结合新域名的一些URL特征来改。上面的a，是旧有域名，b为新的域名 2、原有的域名采用了vbseo的SEO优化，其它的一些网址，要依据格式来调整描述了，但规则的主体没有变]]></description>
		<wfw:commentRss>http://www.zhcn.org/232/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

