作者:手机用户2602913753 | 来源:互联网 | 2014-06-17 10:53
每个环境的伪静态规则都会有区别的,像dx1.5的apache,iis,nginx三种都会有一点区别。下面我们来看看看nginx环境下的做法。
- 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 ^([^.]*)/([a-z]+)-(.+).html$ $1/$2.php?rewrite=$3 last;
- if (!-e $request_filename) {
- return 404;
- }