<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.5.1" -->
<rss version="0.92">
<channel>
	<title>L4Business</title>
	<link>http://www.lamp4business.com</link>
	<description>开源界的一盏明灯</description>
	<lastBuildDate>Fri, 29 Aug 2008 08:06:05 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>.htaccess文件在apache中的配置</title>
		<description>在Apache中设置虚拟目录.

如:
&#60;VirtualHost 192.168.18.4:80&#62;
    ServerAdmin admin@system.com
    DocumentRoot D:\usr\webroot\tiffany
    ServerName www.tiffany4.com          
    ErrorLog logs/dummy-host.example.com-error_log
   CustomLog logs/dummy-host.example.com-access_log common
&#60;/VirtualHost&#62;

此时我们在D:\usr\webroot\tiffany\的根目录下放置了.htaccess文件来实现301.404重定向问题

如果出现这一情况:

没有报.htaccess文件的错误,感觉此文件好象无效,被过滤了.

怎么调试编写.htaccess文件也没有作用的情况,

那么可能的原因就是apache总没有识别此文件,

需要修改Apache中的httpd.conf文件如下:

&#60;VirtualHost 192.168.18.4:80&#62;
    ServerAdmin admin@system
    DocumentRoot D:\usr\webroot\tiffany
    AccessFileName .htaccess
    ServerName www.tiffany4.com
    &#60;Directory "D:/usr/webroot/tiffany"&#62;
             Options FollowSymLinks
             AllowOverride All
             Order deny,allow
             allow from all
    Satisfy all
  &#60;/Directory&#62;     
    ErrorLog logs/dummy-host.example.com-error_log
   CustomLog logs/dummy-host.example.com-access_log common
&#60;/VirtualHost&#62; </description>
		<link>http://www.lamp4business.com/index.php/archives/209</link>
			</item>
	<item>
		<title>PHP删除特定数组内容并且重建数组索引的方法</title>
		<description>/*
* 删除数据中的一个元素 ，并重建索引
* $arr:要删除元素的数组
* $offset:要删除元素的索引
*/
function array_remove(&#38;$arr,$offset){  
    array_splice($arr,$offset,1);  
}   </description>
		<link>http://www.lamp4business.com/index.php/archives/208</link>
			</item>
	<item>
		<title>8月12号聚餐一景</title>
		<description>带着无比眷恋之情踏上了欢送英子的聚餐道路上



先来个主角"特写",嘻嘻~~,摄影师"小/jump木同"人生一大失败,使小小的我挡在了主角的前面为她护航.



再来一张主角笑脸展示图.



小孩的出场总是那么的有个性,连我们部门货真价实的东北大汉,他也敢招惹.



哈哈,这个美女我想在酒桌上是最嚣张的了,就连我们的二锅头也直直摇头,据说她是8年后的今天重出江湖,大开杀戒了,看看下面二锅头,感觉已经没有激昂的张性了.



瞧瞧,这三家伙,看着别人的撕杀,笑的是那么的放肆



哦,再来给我们今天的飞飞特写一张,喝的很多,也表现最出色的一次,

实在摄影师的高超技术,让我只好拿不出江湖的剪裁功能了.哈哈哈



下面是我们的几位美出



 

 

  </description>
		<link>http://www.lamp4business.com/index.php/archives/207</link>
			</item>
	<item>
		<title>网络营销联盟之Affiliate</title>
		<description>Affiliate Program它是联盟营销的载体 


Affiliate program 的原理:
        网站主A上列出许多广告连接,这些广告连接被其他网站主B放到自己的网站上展示出来,
    当浏览的用户C点击网站主B上的这些展示的广告后,跳转到网站主A上面,那么这浏览的用户C
       就算作是网站主B给牵引过来了.
        按照联盟营销模式(CPA-Cost Per Action, 按效果付费;),网站主B应该能从网站主A这里
    按照协议获得佣金.而这一切全建立在网站主A的一套后台程序Affiliate
 
       Affiliate程序需要完成的几大要点:

              1.网站主B的注册会员功能
              2.网站主B注册后的登陆入口
              3.登陆后的管理:
                       I. 查看每月或每阶段的销售明细情况
                       II. 统计销售情况
                       III. 按不同的类型生存相对应的Link--&#62;Get Links
                       IV. 网站主B修改资料与密码的功能
                       V. 网站主B登出系统
                       VI. 后台管理所有的Link,记录来源连接归属哪个网站主B,
                       VII. 设置Link的分成获得的佣金
                       VIII. 统计各网站主B的销售总额及分成情况 </description>
		<link>http://www.lamp4business.com/index.php/archives/206</link>
			</item>
	<item>
		<title>The international card payment solutions</title>
		<description>


1, International cards payment process
Click on “the IPS international card payment ", chooses the payment way of VISA, MasterCard or the JCBInput your international card number, term of validity, CVV2 and your name, IPS will connect the relevant bank to check whether your international card has already registered " the ...</description>
		<link>http://www.lamp4business.com/index.php/archives/205</link>
			</item>
	<item>
		<title>淘宝首页的疑问</title>
		<description>想想也是淘宝首页有两百多K还不包含JS和样式，但是我们打开却很快，到底是为什么呢，生成静态？缓存？……有很大的疑问，今天网上找了老半天才得到答案：CDN加速!

C:\Documents and Settings\Administrator&#62;ping www.taobao.com

Pinging www.gslb.taobao.com [60.12.195.20] with 32 bytes of data:

Reply from 60.12.195.20: bytes=32 time=42ms TTL=239
Reply from 60.12.195.20: bytes=32 time=76ms TTL=239
Reply from 60.12.195.20: bytes=32 time=106ms TTL=239
你ping www.taobao.com 那么将被重定向到一个距离你最近的服务器..而不是真正的 www.taobao.com
我这里被重定向到 www.gslb.taobao.com

CDN的全称是Content Delivery Network，即内容分发网络。其目的是通过在现有的Internet中增加一层新的网络架构，将网站的内容发布到最接近用户的网络"边缘"，使用户可以就近取得所需的内容，解决Internet网络拥挤的状况，提高用户访问网 站的响应速度。从技术上全面解决由于网络带宽小、用户访问量大、网点分布不均等原因所造成的用户访问网站响应速度慢的问题。 </description>
		<link>http://www.lamp4business.com/index.php/archives/204</link>
			</item>
	<item>
		<title>关于“建立HTTP长连接”的考虑！</title>
		<description>今天在CSDN论坛上看一个主题，如何建立HTTP的长连接，下面好多人给出了回答，这里把实现方法粘下，大家讨论下:
服务端：
&#60;?php
$filename  = dirname(__FILE__).'/data.txt';

// store new message in the file
$msg = isset($_GET['msg']) ? $_GET['msg'] : '';
if ($msg != '')
{
  file_put_contents($filename,$msg);
  die();
}
// infinite loop until the data file is not modified
$lastmodif    = isset($_GET['timestamp']) ? $_GET['timestamp'] : 0;
$currentmodif = filemtime($filename);
while ($currentmodif &#60;= $lastmodif) // check if the data file has been modified
{
  ...</description>
		<link>http://www.lamp4business.com/index.php/archives/203</link>
			</item>
	<item>
		<title>Facebook 的 PHP 性能与扩展性</title>
		<description>      今天发现火热的Facebook竟然也是采用LAMP架构开发,
着实让我有一阵惊喜,为自己学习与使用LAMP而感到自豪,
下面转一片支付宝首席DBA--Fenng提到的:
《Facebook 的 PHP 性能与扩展性》
炙手可热的 Facebook 是用 PHP 开发的。随着一些技术交流，逐渐能看到 Facebook 技术人员分享的经验。近期这个 geekSessions 站点上看到 Facebook 的 Lucas Nealan 分享的文档比较有参考价值。

Cache 为 王
任何一个成功的站点都有一套最合适自己的 Cache 策略。

Note：这个层次图画的稍微有点问题，不是严格从上到下的。

The Alternative PHP Cache , APC
Facebook 平均每个用户每天要访问超过 50 个页面，PHP的页面载入时间的优化就比较重要了。在 PHP Cache 层，Facebook 采用了 APC。

Lucas Nealan 的 PPT 举了一个例子，一个页面显示的时间从 4000 多毫秒降到了 100 多 毫秒。在 apc.stat 关闭的模式下，性能还要更好一些。不过需要重启动或用apc_cache_clear() 来通知更新。

Memcached 层
APC Cache 的是非用户相关的信息，而用户相关的数据 ...</description>
		<link>http://www.lamp4business.com/index.php/archives/202</link>
			</item>
	<item>
		<title>apache的重写规则实例</title>
		<description>禁止访问重写文件
Apache：
if(strpos($_SERVER['REQUEST_URI'],"exampleCode.php")){exit;}
IIS：
if($_SERVER['HTTP_X_REWRITE_URL']==$_SERVER['SCRIPT_NAME']){exit;}
 
网站重写规则整理和实例
RewriteEngine On
RewriteBase /
 
一、用途：具体asp文件重写到具体的php文件
规则：RewriteRule sample.asp$ sample.php   




二、用途：404重定向
规则：errorDocument 404 /404.html 




三、用途：example.com 301重定向到www.example.com
规则：RewriteCond %{HTTP_HOST} ^pass4sure.com
RewriteRule (.*) http://www.pass4sure.com/$1 [R=301,L] 
 
四、用途：匹配所有字符
规则：RewriteRule examples/([^/]+)/$ example.php?action=$1
五、用途：匹配5-12位的数字
       规则：RewriteRule numbers/(\d{5,12})/$ number.php?number=$1
六、用途：匹配ip
       规则:RewriteRule ip_address/((\d{1,3}\.){3}\d{1,3})/$ ipaddress.php?number=$1
七、用途：匹配除…之外的字符
       规则：RewriteRule data_counter/[^x]{3,4}/$ ipaddress.php?number=$1
 apache的重写规则和正则表达式大体上差不多，但还是有些差异的 如:[a c] 在apache的重写规则里面就会出现错误，导致网站不可访问，但是在正则里面表示匹配“a” ,“ ”, “c”里的任意一个字符串 </description>
		<link>http://www.lamp4business.com/index.php/archives/201</link>
			</item>
	<item>
		<title>MySQL5上创建视图的实例</title>
		<description>一: 日电新闻建立视图
   
    MYSQL>CREATE VIEW VIEW_RDNEWS AS 
                 SELECT SN_ID,SN_TITLE,SN_CONTENT,Owner,SN_STARTTIME 
                 FROM table_sector_news ...</description>
		<link>http://www.lamp4business.com/index.php/archives/200</link>
			</item>
</channel>
</rss>
