Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[已解决] nginx下这个rewrite rule不起作用啊。。。

[复制链接]
gavin2u 发表于 2010-3-29 08:41:17 | 显示全部楼层 |阅读模式
  1. rewrite "^/dispbbs\.asp\?boardID=([0-9]+)&ID=([0-9]+).*$" "/thread-$2-1-1.html";
复制代码
哪里有错吗?

谢谢了
下砂 发表于 2010-3-29 08:59:41 | 显示全部楼层
不明白您要操作什么
回复

使用道具 举报

popuppp 发表于 2010-3-29 09:05:02 | 显示全部楼层
哪里有错吗?

谢谢了
gavin2u 发表于 2010-3-29 08:41



    https://discuz.dismall.com/thread-1528713-1-1.html
回复

使用道具 举报

 楼主| gavin2u 发表于 2010-3-29 09:17:46 | 显示全部楼层
本帖最后由 gavin2u 于 2010-3-29 09:26 编辑

回复 2# 下砂

我是dvbbs转换到dz的,所以要这么多 rewrite rule
  1. if (!-e $request_filename) {
  2. rewrite "/index\.asp" "/index.php" last;
  3. rewrite "/index\.asp\?boardid=([0-9]+)$" "/forum-$1-1.html" last;
  4. rewrite "/index\.asp\?boardid=([0-9]+)(.*)$" "/forum-$1-1.html" last;
  5. rewrite "/index_([0-9]+)(.*)$" "/forum-$1-1.html" last;
  6. rewrite "^/dispbbs\.asp\?boardID=([0-9]+)&ID=([0-9]+).*$" "/thread-$2-1-1.html" last;

  7. ##############这里有个redirect########

  8. break;
  9. }
复制代码
谢谢各位帮看一下 ops:
回复

使用道具 举报

 楼主| gavin2u 发表于 2010-3-29 09:20:07 | 显示全部楼层
回复 3# popuppp


我之前用的是lighttpd,规则是对的,就是在转到nginx的时候,这些不起作用

dz本身的伪静态是起作用的
  1. rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
  2. rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
  3. rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
  4. rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
  5. rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
  6. break;
复制代码
回复

使用道具 举报

漫天飞舞 发表于 2010-3-29 09:31:25 | 显示全部楼层
回复

使用道具 举报

 楼主| gavin2u 发表于 2010-3-29 09:40:34 | 显示全部楼层
谢谢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-10-3 14:32 , Processed in 0.226980 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表