xj79222770 发表于 2012-7-31 16:27:04

dzx伪静态问题

装了 LNMP一键安装包 ,程序自代的dzx伪静态想修改一下,我便把/local/nginx/conf/discuzx.conf文件,修改成了DZ后台的伪静态。

rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^([^\.]*)/article-(+)-(+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
rewrite ^([^\.]*)/forum-(\w+)-(+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\.]*)/thread-(+)-(+)-(+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
rewrite ^([^\.]*)/group-(+)-(+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^([^\.]*)/blog-(+)-(+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
rewrite ^([^\.]*)/(fid|tid)-(+)\.html$ $1/index.php?action=$2&value=$3 last;
rewrite ^([^\.]*)/(+*)-(+)\.html$ $1/plugin.php?id=$2:$3 last;
rewrite ^([^\.]*)/tel114\.html$ $1/plugin.php?id=sanree_tel114 last;
rewrite ^([^\.]*)/tel114-(index|view)-(.+)\.html$ $1/plugin.php?id=sanree_tel114&mod=$2&tid=$3 last;
if (!-e $request_filename) {
      return 404;
}

最后重启后Nginx

执行如下命令
/usr/local/nginx/sbin/nginx -sreload。

结果,新加的伪静态还是不成功:

比如:rewrite ^([^\.]*)/blog-(+)-(+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;

licess 发表于 2012-7-31 17:39:17

不清楚,原来我们添加的伪静态都是测试过的
页: [1]
查看完整版本: dzx伪静态问题