Discuz!X是康盛創(chuàng)想(Comsenz)推出的一個(gè)以社區(qū)為基礎(chǔ)的專業(yè)建站平臺(tái),讓論壇(BBS)、個(gè)人空間(SNS)、門戶(Portal)、群組(Group)、應(yīng)用開放平臺(tái)(Open Platform)充分融合于一體,幫助網(wǎng)站實(shí)現(xiàn)一站式服務(wù)。
把下面代碼存為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; } }