漩涡's Archivers

From 雨宫优子 on 2011-05-16 03:43:10

使用nginx伪静态规则让静态HTML也能处理php请求[query string]

不用javascript。..在wordpress下。。是不是有些不可思议~嗯嗯


一切的起源请点此


其实某猫说错了。。。nginx和apache下。。。rewrite是不会匹配query string的。。。这个是lighttpd的rewrite和nginx之类的最大区别了。。。大概。。。额。。。我也不知道了呢。。


所以直接套用绝对是失败的~嗯嗯


这个也误导了我很久。。。直到翻到某文章才顿时醒悟。。。


nginx。。。if很好使。。。有一个变量是专门用于匹配query string的~$args


使用示例:【还是为了让cos html cache和seo super comments兼容】




if ($args ~ cid=([0-9]+)){


rewrite (.*) /index.php;


}



查看完整版本: 使用nginx伪静态规则让静态HTML也能处理php请求[query string]

From Melody on 2011-05-16 21:46:43

apache跑的快不。。。相对于nginx

From 雨宫优子 on 2011-05-16 21:51:14

普遍来说apache的性能都没nginx好。。。 不过apache可定制性强。。。嗯。。。

From 言冬 on 2011-06-02 13:26:01

额。还是交给php了

From 雨宫优子 on 2011-06-03 17:26:01

静态页面要处理东西只能靠客户端javascript来完成了。。。。 或者node.js? :nian

From 言冬 on 2011-06-03 17:29:37

额,大站的做法。。。

Tags: cos html cache, nginx, rewrite, SEO Super Comments


©漩涡网络安全实验室