emlog博客在nginx下最新的rewrite规则

作者:KLLER 发布于:2013-9-9 11:16 Monday 分类:emlog

目前网上搜索到的貌似在点击文章评论分页链接时候不好用,我改动了一下:

if (!-f $request_filename){
  set $rule_0 1$rule_0;
}
if (!-d $request_filename){
  set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
  rewrite ^/(post|record|sort|author|page)-([0-9]+)\.html(.*)$ /index.php?$1=$2$3;
  rewrite ^/(post|record|sort|author|page)/([0-9]+)(.*)$ /index.php?$1=$2$3;
  rewrite ^/tag-(.+)\.html$ /index.php?tag=$1;
  rewrite ^/tag/(.+)$ /index.php?tag=$1;
  rewrite ^/t/page/([0-9]+)$ /t/index.php?page=$1;
}


评论:

网游加速器
2013-11-06 12:50
最新效果还不错

发表评论:

  • 使

Powered by emlog