yinghang 发表于 2012-7-18 23:58:39

dz的伪静态求助,急!

我的主站是wp的,论坛是直接放在网站目录下/bbs中,discuz x2的,现在我用lnmp默认伪静态是wp的,于是我修改配置文件添加了include discuzx.conf然后发现wp主站下的连接全部404了,但是论坛下的连接没有问题,该如何修改伪静态配置文件呢?
P.S.nginx的dz伪静态好像没有archive页的,该如何弄呢?

licess 发表于 2012-7-19 09:03:47

discuzx.conf 是主目录可以用的伪静态,二级目录需要修改discuzx.conf
改成
location /bbs/ {
    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 ^([^\.]*)/(+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
    if (!-e $request_filename) {
      return 404;
    }
}

yinghang 发表于 2012-7-21 14:23:54

回复 2# 的帖子

弄好了,谢谢军哥,再问一下啊,那个archive页的伪静态该如何弄呢?
页: [1]
查看完整版本: dz的伪静态求助,急!