推荐应用

Discuz多国语言翻译

Discuz多国语言翻译

文库系统/文档系统

文库系统/文档系统

美食菜谱发布菜谱

美食菜谱发布菜谱

漫画阅读中心

漫画阅读中心

小说阅读中心

小说阅读中心

语言包切换基本文件

语言包切换基本文件

成语闯关

成语闯关

谷歌登錄Google登錄

谷歌登錄Google登錄

轻APP

轻APP

网上祭祀祭拜扫墓

网上祭祀祭拜扫墓

手机MP4视频上传

手机MP4视频上传

彩票开奖号码公布

彩票开奖号码公布

DZX泰语/傣语

DZX泰语/傣语

DZX日文版(日本语)

DZX日文版(日本语)

nginx下的discuz!伪静态规则

发布于 2013-05-20
在添加域名的时候 nginx 下 会让你添加一个伪静态文件,是要自己命名的。文件再/usr/local/nginx/conf目录下
是一个.conf文件 只要把规则放到里面就能实现论坛的伪静态!
附一下规则:Nginx Web Server
这是官方给的放心用!:
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 ^([^\.]*)/f/(\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;
}
扫一扫添加有偿QQ
扫一扫添加微信客服