nginx.conf配置文件中加入
- rewrite ^(.*)/dispbbs.asp http://www.jsly001.com/read.php last;
- rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
- rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last;
第一条规则至关重要,控制动网所有帖子显示的。
read.php里面
找到
- S::gp(array('uid','displayMode'));
下加
- S::gp(array('Id','id'));
- if(($Id || $id) && empty($tid)){
- $Id && $tid = $Id;
- $id && $tid = $id;
- }
因为
linux是区分大小写,而动网的地址有时是Id,有时是id,故写两份。