首页 > CMS教程 > Discuz    日期:2018-08-27 / 来自互联网 / 浏览

Discuz!X是康盛创想(Comsenz)推出的一个以社区为基础的专业建站平台,让论坛(BBS)、个人空间(SNS)、门户(Portal)、群组(Group)、应用开放平台(Open Platform)充分融合于一体,帮助网站实现一站式服务。

把下面代码存为discuzx.conf,然后在域名配置文件(domain.com.conf)中嵌入(include discuzx.conf)就行了。

location / { 
    rewrite ^([^.]*)/topic-(.+).html$ $1/portal.php?mod=topic&topic=$2 last; 
    rewrite ^([^.]*)/article-([0-9]+)-([0-9]+).html$ $1/portal.php?mod=view&aid=$2&page=$3 last; 
    rewrite ^([^.]*)/forum-(w+)-([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; 
    rewrite ^([^.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last; 
    rewrite ^([^.]*)/group-([0-9]+)-([0-9]+).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-([0-9]+)-([0-9]+).html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last; 
    rewrite ^([^.]*)/(fid|tid)-([0-9]+).html$ $1/index.php?action=$2&value=$3 last; 
    if (!-e $request_filename) { 
        return 404; 
    } 
}

觉得上面的内容有用吗?快来点个赞吧!

点赞() 我要打赏

温馨提示 : 本站内容来自会员投稿以及互联网,所有源码及教程均为作者总结编辑,请大家在使用过程中提前做好备份,以免发生无法预知的错误,源码类教程请勿直接用于生产环境!

 可能感兴趣的文章