<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Apache Rewrite 规则详解</title>
	<atom:link href="http://slj.me/2009/04/apache-rewrite-regular/feed/" rel="self" type="application/rss+xml" />
	<link>http://slj.me/2009/04/apache-rewrite-regular/</link>
	<description>申力军的博客</description>
	<lastBuildDate>Fri, 11 May 2012 02:22:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: Chris</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-9644</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 19 Jul 2011 02:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-9644</guid>
		<description>感谢作者，还有请问配置多用户虚拟服务器的时候，我想动态加载用户虚拟机，就是说不重启就可以完成域名指向，请问利用rewrite怎么完成呢？谢谢。</description>
		<content:encoded><![CDATA[<p>感谢作者，还有请问配置多用户虚拟服务器的时候，我想动态加载用户虚拟机，就是说不重启就可以完成域名指向，请问利用rewrite怎么完成呢？谢谢。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: imlyj</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-9627</link>
		<dc:creator>imlyj</dc:creator>
		<pubDate>Wed, 15 Jun 2011 07:00:20 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-9627</guid>
		<description>最近一直再看这块，但感觉apache官方文档上说的不详细呀。不知道哪有好点的文章。还请博主指点</description>
		<content:encoded><![CDATA[<p>最近一直再看这块，但感觉apache官方文档上说的不详细呀。不知道哪有好点的文章。还请博主指点</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: imlyj</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-9626</link>
		<dc:creator>imlyj</dc:creator>
		<pubDate>Wed, 15 Jun 2011 06:58:47 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-9626</guid>
		<description>请问：我想把http://localhsot:8080/front/theme_list.do?categoryCode=6&amp;cid=zt07&amp;pos=&amp;site=0&amp;fee=0&amp;pageSize=5
弄成
http://localhsot:8080/front/theme_list.html/6/zt07//0/0/5/格式，应该怎么呀。试了N多次，还是不行！！</description>
		<content:encoded><![CDATA[<p>请问：我想把http://localhsot:8080/front/theme_list.do?categoryCode=6&amp;cid=zt07&amp;pos=&amp;site=0&amp;fee=0&amp;pageSize=5<br />
弄成<br />
<a href="http://localhsot:8080/front/theme_list.html/6/zt07//0/0/5/格式，应该怎么呀。试了N多次，还是不行！！" rel="nofollow">http://localhsot:8080/front/theme_list.html/6/zt07//0/0/5/格式，应该怎么呀。试了N多次，还是不行！！</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 苹果</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-9537</link>
		<dc:creator>苹果</dc:creator>
		<pubDate>Tue, 18 Jan 2011 11:29:36 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-9537</guid>
		<description>很潇洒的一盘文章，受益匪浅</description>
		<content:encoded><![CDATA[<p>很潇洒的一盘文章，受益匪浅</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SLJ</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-9536</link>
		<dc:creator>SLJ</dc:creator>
		<pubDate>Sat, 15 Jan 2011 15:28:08 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-9536</guid>
		<description>forum前面加一个/试一试？

 RewriteRule ^/dvb/dispbbs\.php?boardID=([0-9]+)&amp;ID=([0-9]+)$ /forum.php?mod=forumdisplay&amp;fid=$1&amp;tid=$2</description>
		<content:encoded><![CDATA[<p>forum前面加一个/试一试？</p>
<p> RewriteRule ^/dvb/dispbbs\.php?boardID=([0-9]+)&#038;ID=([0-9]+)$ /forum.php?mod=forumdisplay&#038;fid=$1&#038;tid=$2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnWhong</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-9535</link>
		<dc:creator>JohnWhong</dc:creator>
		<pubDate>Fri, 14 Jan 2011 00:42:37 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-9535</guid>
		<description>申君，这篇是我看到的最容易理解的一个。请教一个问题，想要将http://www.guomaoren.com/dvb/dispbbs.php?boardid=4&amp;id=3978指向新的http://www.guomaoren.com/forum.php?mod=forumdisplay&amp;fid=41tid=3978
我目前的自己写的规则是：
RewriteRule ^/dvb/dispbbs\.php?boardID=([0-9]+)&amp;ID=([0-9]+)$ forum.php?mod=forumdisplay&amp;fid=$1tid=$2但失败，
RewriteRule ^dvb\/dispbbs\.php/?(.*)$ &quot;http\:\/\/www\.guomaoren\.com\/forum\.php\?mod\=forumdisplay&amp;fid\=4&quot; [R=301,L]
通过这样，可以跳到版面页面。请问是哪里出错，已经折腾好几天了，如能赐教，不胜感谢！</description>
		<content:encoded><![CDATA[<p>申君，这篇是我看到的最容易理解的一个。请教一个问题，想要将http://www.guomaoren.com/dvb/dispbbs.php?boardid=4&amp;id=3978指向新的http://www.guomaoren.com/forum.php?mod=forumdisplay&amp;fid=41tid=3978<br />
我目前的自己写的规则是：<br />
RewriteRule ^/dvb/dispbbs\.php?boardID=([0-9]+)&amp;ID=([0-9]+)$ forum.php?mod=forumdisplay&amp;fid=$1tid=$2但失败，<br />
RewriteRule ^dvb\/dispbbs\.php/?(.*)$ &#8220;http\:\/\/www\.guomaoren\.com\/forum\.php\?mod\=forumdisplay&amp;fid\=4&#8243; [R=301,L]<br />
通过这样，可以跳到版面页面。请问是哪里出错，已经折腾好几天了，如能赐教，不胜感谢！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SLJ</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-9436</link>
		<dc:creator>SLJ</dc:creator>
		<pubDate>Thu, 15 Jul 2010 15:12:14 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-9436</guid>
		<description>
    Options FollowSymLinks

在httpd.conf</description>
		<content:encoded><![CDATA[<p>Options FollowSymLinks</p>
<p>在httpd.conf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 孙阳</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-9435</link>
		<dc:creator>孙阳</dc:creator>
		<pubDate>Wed, 14 Jul 2010 02:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-9435</guid>
		<description>必须打开此目录的FollowSymLinks属性  ?? 在哪里打开</description>
		<content:encoded><![CDATA[<p>必须打开此目录的FollowSymLinks属性  ?? 在哪里打开</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 叶子</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-2319</link>
		<dc:creator>叶子</dc:creator>
		<pubDate>Sun, 01 Nov 2009 13:33:26 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-2319</guid>
		<description>
  ErrorDocument 404 /404.php
  ErrorDocument 500 /404.php
  DocumentRoot &quot;D:/www&quot;
  ServerName   all-sites
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^[a-z0-9\-]+\.abc\.cn$
  RewriteRule ^/(.*)$ /%{SERVER_NAME}/$1 
  RewriteRule ^/([a-z0-9\-]+)\.abc\.cn/(.*)$ D:/www/$1/$2 [L]
  RewriteRule ^.*$ /index.php [L]

hosts文件
192.168.1.2       www.ibabyzone.cn
实现效果：www.abc.cn 直接指向 D:/www
              html.abc.cn 直接指向 D:/www/html/
              forum.abc.cn 直接指向 D:/www/forum/

帮忙看看好吗</description>
		<content:encoded><![CDATA[<p>  ErrorDocument 404 /404.php<br />
  ErrorDocument 500 /404.php<br />
  DocumentRoot &#8220;D:/www&#8221;<br />
  ServerName   all-sites<br />
  RewriteEngine on<br />
  RewriteCond %{HTTP_HOST} ^[a-z0-9\-]+\.abc\.cn$<br />
  RewriteRule ^/(.*)$ /%{SERVER_NAME}/$1<br />
  RewriteRule ^/([a-z0-9\-]+)\.abc\.cn/(.*)$ D:/www/$1/$2 [L]<br />
  RewriteRule ^.*$ /index.php [L]</p>
<p>hosts文件<br />
192.168.1.2       <a href="http://www.ibabyzone.cn" rel="nofollow">http://www.ibabyzone.cn</a><br />
实现效果：www.abc.cn 直接指向 D:/www<br />
              html.abc.cn 直接指向 D:/www/html/<br />
              forum.abc.cn 直接指向 D:/www/forum/</p>
<p>帮忙看看好吗</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 申</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-2033</link>
		<dc:creator>申</dc:creator>
		<pubDate>Tue, 20 Oct 2009 07:07:24 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-2033</guid>
		<description>RewriteRule ^/(.+)/(.+) http://www.liucheng.name/?$1=$2 [R=permanent,L]
要HTTP 301用
[R=permanent,L]
或者
[R=301,L]</description>
		<content:encoded><![CDATA[<p>RewriteRule ^/(.+)/(.+) <a href="http://www.liucheng.name/?$1=$2" rel="nofollow">http://www.liucheng.name/?$1=$2</a> [R=permanent,L]<br />
要HTTP 301用<br />
[R=permanent,L]<br />
或者<br />
[R=301,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lc.</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-1985</link>
		<dc:creator>Lc.</dc:creator>
		<pubDate>Fri, 16 Oct 2009 05:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-1985</guid>
		<description>高手阿~ 问个问题~  标签页面的301重定向.
把所有类似这样的www.liucheng.name/?tag=ncbi
301为http://liucheng.name/tag/ncbi/
.htaccess里应该怎样写呢?</description>
		<content:encoded><![CDATA[<p>高手阿~ 问个问题~  标签页面的301重定向.<br />
把所有类似这样的www.liucheng.name/?tag=ncbi<br />
301为http://liucheng.name/tag/ncbi/<br />
.htaccess里应该怎样写呢?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hunt</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-513</link>
		<dc:creator>hunt</dc:creator>
		<pubDate>Wed, 29 Jul 2009 09:12:46 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-513</guid>
		<description>RewriteEngine On
RewriteCond %{REQUEST_URI} ^/bbs/
RewriteRule ^bbs/(.*) http://bbs.sicasoft.com/$1 [R=permanent,L]
RewriteCond %{REQUEST_URI} !^/bbs/
RewriteRule ^(.*) http://www.sicasoft.com/$1 [R=permanent,L]

为什么我照你的方法写  我的机子会出现两个//  比如说本来是http://www.sicasoft.com/  却变成了http://www.sicasoft.com//</description>
		<content:encoded><![CDATA[<p>RewriteEngine On<br />
RewriteCond %{REQUEST_URI} ^/bbs/<br />
RewriteRule ^bbs/(.*) <a href="http://bbs.sicasoft.com/$1" rel="nofollow">http://bbs.sicasoft.com/$1</a> [R=permanent,L]<br />
RewriteCond %{REQUEST_URI} !^/bbs/<br />
RewriteRule ^(.*) <a href="http://www.sicasoft.com/$1" rel="nofollow">http://www.sicasoft.com/$1</a> [R=permanent,L]</p>
<p>为什么我照你的方法写  我的机子会出现两个//  比如说本来是http://www.sicasoft.com/  却变成了http://www.sicasoft.com//</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiya</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-280</link>
		<dc:creator>Kiya</dc:creator>
		<pubDate>Thu, 11 Jun 2009 11:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-280</guid>
		<description>RewriteCond %{HTTP_HOST} ^bbs\.brandhb\.com [NC]
RewriteRule ^(.*)$ http://bbs.hd00.com/$1 [R=301]

应该可以</description>
		<content:encoded><![CDATA[<p>RewriteCond %{HTTP_HOST} ^bbs\.brandhb\.com [NC]<br />
RewriteRule ^(.*)$ <a href="http://bbs.hd00.com/$1" rel="nofollow">http://bbs.hd00.com/$1</a> [R=301]</p>
<p>应该可以</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gavin</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-279</link>
		<dc:creator>gavin</dc:creator>
		<pubDate>Thu, 11 Jun 2009 04:28:22 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-279</guid>
		<description>谢谢回答，还是不行哦。
请帮我看看
bbs.brandhb.com  要跳到  bbs.hd00.com</description>
		<content:encoded><![CDATA[<p>谢谢回答，还是不行哦。<br />
请帮我看看<br />
bbs.brandhb.com  要跳到  bbs.hd00.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiya</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-256</link>
		<dc:creator>Kiya</dc:creator>
		<pubDate>Thu, 04 Jun 2009 02:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-256</guid>
		<description>我试过用rewrite来实现这个功能效果不是很好，用泛解析到一个脚本上，接着在脚本内判断请求地址执行跳转或者直接显示是比较好的办法，也是目前主流采用的。</description>
		<content:encoded><![CDATA[<p>我试过用rewrite来实现这个功能效果不是很好，用泛解析到一个脚本上，接着在脚本内判断请求地址执行跳转或者直接显示是比较好的办法，也是目前主流采用的。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jungle</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-255</link>
		<dc:creator>jungle</dc:creator>
		<pubDate>Wed, 03 Jun 2009 08:16:32 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-255</guid>
		<description>公司最近换服务器，想通过apache2.x和tomcat6整合，在window server2003的环境下，查了好多的资料，整合不是很顺利。
当然最主要的问题是通过apache实现对域名的rewrite的功能，例如www.xxx.soft.com实际指向是www.soft.com/xxx,根据xxx找到对应的文件夹。</description>
		<content:encoded><![CDATA[<p>公司最近换服务器，想通过apache2.x和tomcat6整合，在window server2003的环境下，查了好多的资料，整合不是很顺利。<br />
当然最主要的问题是通过apache实现对域名的rewrite的功能，例如www.xxx.soft.com实际指向是www.soft.com/xxx,根据xxx找到对应的文件夹。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiya</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-235</link>
		<dc:creator>Kiya</dc:creator>
		<pubDate>Tue, 26 May 2009 16:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-235</guid>
		<description>试一试
RewriteCond %{HTTP_HOST} ^bbs.AAA.com [NC]
RewriteRule ^(.*)$ http://bbs.BBB.com/$1 [R=301,NC]

RewriteCond %{HTTP_HOST} ^www.AAA.com [NC]
RewriteRule ^(.*)$ http://www.BBB.com/$1 [R=301,NC]</description>
		<content:encoded><![CDATA[<p>试一试<br />
RewriteCond %{HTTP_HOST} ^bbs.AAA.com [NC]<br />
RewriteRule ^(.*)$ <a href="http://bbs.BBB.com/$1" rel="nofollow">http://bbs.BBB.com/$1</a> [R=301,NC]</p>
<p>RewriteCond %{HTTP_HOST} ^www.AAA.com [NC]<br />
RewriteRule ^(.*)$ <a href="http://www.BBB.com/$1" rel="nofollow">http://www.BBB.com/$1</a> [R=301,NC]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gavin</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-234</link>
		<dc:creator>gavin</dc:creator>
		<pubDate>Tue, 26 May 2009 07:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-234</guid>
		<description>您好，
     最近网站改名了，我想把网站bbs.AAA.com 转到bbs.BBB.com ，www.AAA.com 转到 www.BBB.com   AAA.com 转到 BBB.com 
    我是这样写的：(www成功，bbs的无效)
    RewriteCond %{HTTP_HOST} ^bbs.AAA.com [NC]
   RewriteRule ^(.*)$ http://bbs.BBB.com$1 [R=301,nc]

   RewriteCond %{HTTP_HOST} ^www.AAA.com [nc]
   RewriteRule ^(.*)$ http://www.BBB.com$1 [r=301,nc]

请帮我看看，问题在哪里，谢谢！我仔细看过您的文章，您也换域名了，但情况有一点小小的差别，不好意思，麻烦了！</description>
		<content:encoded><![CDATA[<p>您好，<br />
     最近网站改名了，我想把网站bbs.AAA.com 转到bbs.BBB.com ，www.AAA.com 转到 <a href="http://www.BBB.com" rel="nofollow">http://www.BBB.com</a>   AAA.com 转到 BBB.com<br />
    我是这样写的：(www成功，bbs的无效)<br />
    RewriteCond %{HTTP_HOST} ^bbs.AAA.com [NC]<br />
   RewriteRule ^(.*)$ <a href="http://bbs.BBB.com$1" rel="nofollow">http://bbs.BBB.com$1</a> [R=301,nc]</p>
<p>   RewriteCond %{HTTP_HOST} ^www.AAA.com [nc]<br />
   RewriteRule ^(.*)$ <a href="http://www.BBB.com$1" rel="nofollow">http://www.BBB.com$1</a> [r=301,nc]</p>
<p>请帮我看看，问题在哪里，谢谢！我仔细看过您的文章，您也换域名了，但情况有一点小小的差别，不好意思，麻烦了！</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cgeek</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-224</link>
		<dc:creator>cgeek</dc:creator>
		<pubDate>Fri, 22 May 2009 16:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-224</guid>
		<description>好文，感谢分享</description>
		<content:encoded><![CDATA[<p>好文，感谢分享</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kiya</title>
		<link>http://slj.me/2009/04/apache-rewrite-regular/comment-page-1/#comment-145</link>
		<dc:creator>Kiya</dc:creator>
		<pubDate>Thu, 07 May 2009 18:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://kiya.cn/?p=211#comment-145</guid>
		<description>您好。这样写：
RewriteEngine On

RewriteRule ^(.+)$  index.php?id=$1 

不过如果要限制您所说的 **** 的内容，比如你限制是数字的话就这样：
RewriteRule ^([0-9]+)$  index.php?id=$1</description>
		<content:encoded><![CDATA[<p>您好。这样写：<br />
RewriteEngine On</p>
<p>RewriteRule ^(.+)$  index.php?id=$1 </p>
<p>不过如果要限制您所说的 **** 的内容，比如你限制是数字的话就这样：<br />
RewriteRule ^([0-9]+)$  index.php?id=$1</p>
]]></content:encoded>
	</item>
</channel>
</rss>

