<?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>O&#039;Co DOO &#187; apache</title>
	<atom:link href="http://www.iscodoo.com/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.iscodoo.com</link>
	<description>一个竟然存在了四年的博客</description>
	<lastBuildDate>Sat, 24 Jul 2010 10:26:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Lighttpd下的301重定向</title>
		<link>http://www.iscodoo.com/2009/12/301-redirect-on-lighttpd.html</link>
		<comments>http://www.iscodoo.com/2009/12/301-redirect-on-lighttpd.html#comments</comments>
		<pubDate>Mon, 28 Dec 2009 12:54:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Website]]></category>
		<category><![CDATA[301 redirect]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Kloxo]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://www.iscodoo.com/?p=10593</guid>
		<description><![CDATA[步入正题，有关301重定向的问题，网上一大堆，大都是差不多的文章，可以参考百度百科，也可以参考月光的301重定向的实现方法。 资料基本上都是讲apache, ASP, PHP, JavaScript等实现301重定向的方法的，因为我才把apache换成lighttpd，所以需要有关Lighttpd的相关资料。又因为中文的Lighttpd资料太少，使用的相对也少一些，英文资料也是很简洁，只好自己摸索。 我的要求是，不仅是首页url的重定向，整个网站里第一个url都要能重定向到对应的页面上，而不会出现404 page not found。而事实上，网上教你301重定向的方法的，基本上都是首页的重定向，所以这个对我来说没有意义。关http1.1状态的知识，可以参考：18禁“网页”和HTTP 1.1状态代码及其含义。 几种301重定向实现方法的利弊： ASP： 几百年前我就不用了，想用也用不了。 PHP：简单，但是它只能实现文件的跳转，目录就不行了，放弃。 JavaScript：简单，但会被搜索引擎惩罚，放弃。 DNS：这个就是转发了，只能定向首页，无用。 Apache：这个我向青蛙同志借了一个Apcahe的空间亲自实验过，可以用而且很完美，规则就一句： RedirectMatch permanent ^/(.*)$ http://www.newdomain.com/$1 直接把这句话放网站根目录下的.htaccess里就行了。 以上所有方法都不能满足我的要求，而且我不想换回apache，只能去探索Lighttpd的方法了。还好，没多会就找到了，也是一句话： $HTTP["host"] == &#8220;www.olddomain.com&#8221; { url.redirect = ( &#8220;^/(.*)&#8221; =&#62; &#8220;http://www.newdomain.com/$1&#8243;, ) } 好了，关键是这句话放在什么地方，Lighttpd是没有.htaccess文件的，只能放在/etc/lighttpd/lighttpd.conf里面。这时候要注意，如果你的lighttpd.conf里面有rewrite规则的话，有可能不成功，要把上面的redirect规则放在这个文件的最前面。保存文件后在终端重启Lighttpd：service lighttpd restart. 由于我的VPS用的是Kloxo（LXadmin的前身）面版，把这个放在lighttpd.conf里面是无用的，这一点折腾了我好几天的时间，正赶上人家过圣诞节放假，求助无果。仔细阅读了lighttpd.conf，在最后面发现有这样一句：include &#8220;conf/kloxo/kloxo.conf&#8221;，才发现原来Kloxo的301重定向规则是放在/etc/lighttpd/conf/kloxo/lighttpd.yourdomain.com这个文件里的。删除里面所有内容，放入上面那个规则，重启Lighttpd服务，使用Check Server Headers Tool &#8211; HTTP Status Codes Checker检查，一切OK，所有URL都301重定向到了相对应的页面，没有一个404产生。 为了能够更好的使网站在301重定向过程中不受搜索引擎的惩罚，建议参考一下Google网站管理员中心的几篇文章： 301 重定向 迁移网站]]></description>
		<wfw:commentRss>http://www.iscodoo.com/2009/12/301-redirect-on-lighttpd.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>lighttpd rewrite for joomla sh404sef</title>
		<link>http://www.iscodoo.com/2009/12/lighttpd-rewrite-for-joomla-sh404sef.html</link>
		<comments>http://www.iscodoo.com/2009/12/lighttpd-rewrite-for-joomla-sh404sef.html#comments</comments>
		<pubDate>Tue, 08 Dec 2009 06:56:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Website]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Kloxo]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[sh404SEF]]></category>

		<guid isPermaLink="false">http://www.iscodoo.com/?p=10580</guid>
		<description><![CDATA[I switch apache to lighttpd on my VPS with Kloxo, everything are running well except one Joomla based site. It mainly because the Joomla site has SH404SEF installed. I find &#8220;How do i configure my lighttpd server&#8221; on FAQ of SH404SEF site, now everything of this Joomla site runs well. Here is how to configure]]></description>
		<wfw:commentRss>http://www.iscodoo.com/2009/12/lighttpd-rewrite-for-joomla-sh404sef.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
