<p>

<span style="font-family:'Microsoft YaHei';color:#337FE5;font-size:16px;">强制缓存php页面是 kangle web 的一大特色,当然得要商业版(<span style="color:#E53333;">纠正一下,官方说2.9.2版以后已免费提供此功能</span>)</span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';color:#337FE5;font-size:16px;">强制缓存php的好处:降低负载,后端php偶尔阵亡不会被察觉。。其他自己联想吧</span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';color:#337FE5;font-size:16px;">教程只是抛砖引玉,有啥不对的还望指出</span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';color:#337FE5;font-size:16px;"><strong><br />

</span>
</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:14px;line-height:24px;">简单介绍一下设置方法:</span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:18px;"><span style="line-height:24px;"><strong>一 . 思路</strong></span></span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:14px;"><span style="line-height:24px;">&nbsp; &nbsp; 1.设置缓存前台页面</span></span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:14px;"><span style="line-height:24px;">&nbsp; &nbsp; 2.设置拒绝缓存后台页面(可正常登陆后台)</span></span> 

</p>
<p>

<span style="line-height:24px;"><br />

</span>
</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:18px;"><span style="line-height:24px;"><strong>二 . 操作步骤&nbsp;</strong></span></span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:14px;"><span style="line-height:24px;">&nbsp; &nbsp; &nbsp; 以下操作均在kangle后台的“回应控制”中操作</span></span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:14px;"><span style="line-height:24px;">&nbsp; &nbsp;&nbsp;<strong><span style="font-size:16px;">1. 缓存前台页面的操作</span></strong></span></span> 

</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:14px;"><span style="line-height:24px;">&nbsp; &nbsp; &nbsp; &nbsp; 点击"插入"添加规则:</span></span> 

</p>
<p>

<span style="line-height:24px;font-family:'Microsoft YaHei';font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1)可用的匹配模块 中 选择 host,填入你的域名,如 www.himy2.com &nbsp;PS: 不带http</span> 

</p>
<p>

<span style="line-height:24px;"><span style="font-family:'Microsoft YaHei';font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2)可用的标记模块 中 选择&nbsp;</span><span style="font-family:'Microsoft YaHei';font-size:14px;line-height:normal;">cache_control</span><span style="font-family:'Microsoft YaHei';font-size:14px;">,并勾选 静态化 ,填入缓存时间(按秒记)如 84600</span></span> 

</p>
<p>

<span style="line-height:24px;font-family:'Microsoft YaHei';font-size:14px;">如图:</span> 

</p>
<p>

<a href="http://img.himy2.com/wp-content/uploads/2014/11/QQ%E5%9B%BE%E7%89%8720141121230458.jpg"><img src="http://img.himy2.com/wp-content/uploads/2014/11/QQ%E5%9B%BE%E7%89%8720141121230458.jpg" alt="QQ图片20141121230458" width="714" height="197" class="alignnone size-full wp-image-238" /></a> 

</p>
<p>

<br />

</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:14px;">到此完成全站静态化</span> 

</p>
<p>

<br />

</p>
<p>

<span style="font-family:'Microsoft YaHei';font-size:14px;">&nbsp;&nbsp;<span style="font-size:16px;"><strong>2. 排除登陆页面及后台</strong></span></span> 

</p>
<p>

<span style="line-height:1.5;font-family:'Microsoft YaHei';font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;为了能够正常使用后台,需要排除登陆页面和后台的URL,所以我们还需要在回应控制中添加规则:</span> 

</p>
<p>

<span style="line-height:1.5;font-family:'Microsoft YaHei';font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1)可用的匹配模块 中选择 URL 并填入http://你的域名/wp-admin/* 勾选 or</span> 

</p>
<p>

<span style="line-height:1.5;"><span style="font-family:'Microsoft YaHei';font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2)</span><span style="font-family:'Microsoft YaHei';font-size:14px;">可用的匹配模块 中选择 URL 并填入</span><span style="font-family:'Microsoft YaHei';font-size:14px;">http://www.himy2.com/wp-login.php*</span><span style="font-family:'Microsoft YaHei';font-size:14px;">&nbsp;勾选 or</span><span style="font-family:'Microsoft YaHei';font-size:14px;"></span></span> 

</p>
<p>

<span style="line-height:1.5;"><span style="font-family:'Microsoft YaHei';font-size:14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3)</span><span style="font-family:Simsun;font-size:13px;line-height:normal;"><span style="font-family:'Microsoft YaHei';font-size:14px;">可用的标记模块 中选择&nbsp;</span><span style="font-family:'Microsoft YaHei';font-size:14px;">response_flag 并填入&nbsp;nocache,nodiskcache,</span></span></span> 

</p>
<p>

<span style="line-height:1.5;"><span style="font-family:Simsun;font-size:13px;line-height:normal;"><span style="font-family:'Microsoft YaHei';font-size:14px;">如图</span><span style="font-family:'Microsoft YaHei';font-size:14px;"></span></span><span style="font-family:'Microsoft YaHei';font-size:14px;"></span></span> 

</p>
<p>

<span style="line-height:1.5;"><br />

</span>
</p>
<p>

<br />

</p>
<p>

<a href="http://img.himy2.com/wp-content/uploads/2014/11/QQ%E5%9B%BE%E7%89%8720141121231529.jpg"><img src="http://img.himy2.com/wp-content/uploads/2014/11/QQ%E5%9B%BE%E7%89%8720141121231529.jpg" alt="QQ图片20141121231529" width="760" height="233" class="alignnone size-full wp-image-239" /></a> 

</p>
<p>

<br />

</p>
<p>

<span style="font-family:'Microsoft YaHei';">教程到此结束</span> 

</p>

Last modification:December 13th, 2017 at 11:43 pm