<?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>fatkun&#039;s blog &#187; htaccess</title>
	<atom:link href="http://fatkun.com/tag/htaccess/feed" rel="self" type="application/rss+xml" />
	<link>http://fatkun.com</link>
	<description>又一个 WordPress 站点</description>
	<lastBuildDate>Sun, 05 Feb 2012 15:21:33 +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>000webhost开启gzip压缩(使用htaccess开启gzip)</title>
		<link>http://fatkun.com/2010/07/000webhost-htaccess-gzip.html</link>
		<comments>http://fatkun.com/2010/07/000webhost-htaccess-gzip.html#comments</comments>
		<pubDate>Tue, 06 Jul 2010 04:35:17 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[胡言乱语]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=437</guid>
		<description><![CDATA[对于000webhost空间，开启Gzip压缩功能会有网页打不开的现象，不管是通过插件开启还是其他方法，网页打不开，后台打不开始终是个大问题。 首先，看看你的根目录下有没有.htaccess文件，如果没有请在本地建立x.htaccess然后上传到你的根目录下，重命名为.htaccess。请注意，.htaccess文件的位置是在根目录下，比如我的是public_html/.htaccess。 其次，打开.htaccess文件，添加以下语句 php_flag zlib.output_compression On php_value zlib.output_compression_level 8 检测你的博客，看看是否开启了Gzip压缩功能。 http://tool.chinaz.com/Gzips/ http://gzip.zzbaike.com/ 上文来源：http://www.indear.net/274.html &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 我的首页压缩后的大小 检测结果 是否压缩？ 是 压缩类型： gzip 源文件大小： 40.64KB 压缩后大小： 9.98KB 压缩率： 75.4% 压缩得还不小吧，以前一直以为装了WP Super Cache，并且启用了gzip就可以了，发现根本没有启用到，可能是000webhost本身的缘故吧，使用上文所写的方法就可以启用了。 开启后super cache会提示 PHP 正在压缩发送给您网站访客的数据。建议停用此功能，因为插件会压缩一遍页面，而不是一遍又一遍压缩相同的页面。 应该是说它已经一次性帮你压缩缓存成文件了，不需要每次都压缩页面（在htaccess改每访问一次都会压缩），可是插件根本没压缩啊。。没办法，只能这样了，反正效率差不了多少。]]></description>
			<content:encoded><![CDATA[<p>对于<a style="text-decoration: none; color: #3d1466;" href="http://www.000webhost.com/">000webhost</a>空间，开启Gzip压缩功能会有网页打不开的现象，不管是通过插件开启还是其他方法，网页打不开，后台打不开始终是个大问题。</p>
<p style="margin-top: 0px; margin-bottom: 15px;">首先，看看你的根目录下有没有.htaccess文件，如果没有请在本地建立x.htaccess然后上传到你的根目录下，重命名为.htaccess。请注意，.htaccess文件的位置是在根目录下，比如我的是public_html/.htaccess。</p>
<p style="margin-top: 0px; margin-bottom: 15px;">其次，打开.htaccess文件，添加以下语句</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">php_flag zlib.output_compression On
php_value zlib.output_compression_level 8</pre></div></div>

<p>检测你的博客，看看是否开启了Gzip压缩功能。<br />
<a href="http://tool.chinaz.com/Gzips/" target="_blank">http://tool.chinaz.com/Gzips/</a><br />
<a href="http://gzip.zzbaike.com/" target="_blank">http://gzip.zzbaike.com/</a><br />
上文来源：<a href="http://www.indear.net/274.html">http://www.indear.net/274.html</a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>我的首页压缩后的大小</p>
<table style="border-collapse: collapse; font-size: 14px; line-height: 25px; color: #666666; width: 430px; font-family: Simsun; padding: 0px; margin: 0px;" border="0">
<tbody style="padding: 0px; margin: 0px;">
<tr style="background-color: #6fbee7; padding: 0px; margin: 0px;">
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;" colspan="2">
<h2 style="font-size: 16px; font-weight: bold; color: #ffffff; padding: 0px; margin: 0px;">检测结果</h2>
</td>
</tr>
<tr style="padding: 0px; margin: 0px;">
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;">是否压缩？</td>
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;"><span style="font-weight: bold; color: #009900; padding: 0px; margin: 0px;">是</span></td>
</tr>
<tr style="padding: 0px; margin: 0px;">
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;">压缩类型：</td>
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;"><span style="font-weight: bold; color: #0000ff; padding: 0px; margin: 0px;">gzip</span></td>
</tr>
<tr style="padding: 0px; margin: 0px;">
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;">源文件大小：</td>
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;"><span style="font-weight: bold; padding: 0px; margin: 0px;">40.64KB</span></td>
</tr>
<tr style="padding: 0px; margin: 0px;">
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;">压缩后大小：</td>
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;"><span style="font-weight: bold; padding: 0px; margin: 0px;">9.98KB</span></td>
</tr>
<tr style="padding: 0px; margin: 0px;">
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;">压缩率：</td>
<td style="padding-top: 0px; padding-right: 10px; padding-bottom: 0px; padding-left: 10px; height: 25px; margin: 0px; border: 1px solid #6fbee7;"><span style="font-weight: bold; padding: 0px; margin: 0px;">75.4%</span></td>
</tr>
</tbody>
</table>
<p>压缩得还不小吧，以前一直以为装了<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; display: block; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;"><strong>WP Super Cache</strong>，并且启用了gzip就可以了，发现根本没有启用到，可能是000webhost本身的缘故吧，使用上文所写的方法就可以启用了。</span></p>
<p><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; display: block; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">开启后super cache会提示</span></p>
<blockquote><p><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; display: block; background-position: initial initial; background-repeat: initial initial; padding: 0px; border: 0px initial initial;">PHP 正在压缩发送给您网站访客的数据。建议停用此功能，因为插件会压缩一遍页面，而不是一遍又一遍压缩相同的页面。</span></p></blockquote>
<p>应该是说它已经一次性帮你压缩缓存成文件了，不需要每次都压缩页面（在htaccess改每访问一次都会压缩），可是插件根本没压缩啊。。没办法，只能这样了，反正效率差不了多少。</p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2010/07/000webhost-htaccess-gzip.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>利用.htaccess解决000webhost免费主机Google Adsense验证问题(adsense.txt)</title>
		<link>http://fatkun.com/2010/05/000webhost-and-google-adsense-adsense-txt.html</link>
		<comments>http://fatkun.com/2010/05/000webhost-and-google-adsense-adsense-txt.html#comments</comments>
		<pubDate>Fri, 28 May 2010 02:41:27 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[胡言乱语]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=308</guid>
		<description><![CDATA[最近在申请Google Adsense，提示要验证域名的所有者，所以上网找到了这个方法。我使用的是wordpress，用super-cache时加了一些规则，注意要把下面的规则放到最前面。 原创文章，转载请注明： 转载自利用rewrite规则解决000webhost免费主机Google Adsense验证问题 解决方法： 最近长脚在生气Google Adsense的广告申请，可是在申请过程中遇到了瓶颈。Google Adsense需要在网站根目录放置一个adsense.txt的文件，来证明这个网站的所有权。长脚在放了好几次，都无法正常的通过浏览器访问到这个txt文件，网上查找了一下，好像是000webhost主机做过设置还是怎么的，反正就是不行。 不过长脚还是找来一个偏门的解决办法,利用.htaccess中添加rewrite语句。具体请看下例： RewriteRule ^a\.txt$ a.html 其中要上传的文件为a.html，访问的为a.txt 如果你的.htaccess文件中是空的，那就要写全下列语句了 RewriteEngine on RewriteBase / RewriteRule ^a\.txt$ a.html 有以上问题的朋友不妨试试看这个方法]]></description>
			<content:encoded><![CDATA[<p>最近在申请Google Adsense，提示要验证域名的所有者，所以上网找到了这个方法。我使用的是wordpress，用super-cache时加了一些规则，注意要把下面的规则放到最前面。</p>
<p><strong>原创文章，转载请注明：</strong> 转载自<a style="color: #5371c5; text-decoration: none; padding: 0px; margin: 0px;" href="http://www.imlongleg.com/archives/94.html">利用rewrite规则解决000webhost免费主机Google Adsense验证问题</a></p>
<h2>解决方法：</h2>
<p>最近长脚在生气Google Adsense的广告申请，可是在申请过程中遇到了瓶颈。Google Adsense需要在网站根目录放置一个adsense.txt的文件，来证明这个网站的所有权。长脚在放了好几次，都无法正常的通过浏览器访问到这个txt文件，网上查找了一下，好像是000webhost主机做过设置还是怎么的，反正就是不行。</p>
<p>不过长脚还是找来一个偏门的解决办法,利用.htaccess中添加rewrite语句。具体请看下例：</p>
<p><strong>RewriteRule ^a\.txt$ a.html</strong></p>
<p>其中要上传的文件为a.html，访问的为a.txt</p>
<p>如果你的.htaccess文件中是空的，那就要写全下列语句了</p>
<p><strong>RewriteEngine on<br />
RewriteBase /<br />
RewriteRule ^a\.txt$ a.html</strong></p>
<p>有以上问题的朋友不妨试试看这个方法</p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2010/05/000webhost-and-google-adsense-adsense-txt.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

