容器技术交流

 找回密码
 立即注册
查看: 2634|回复: 3

用了置顶的那个Nginx的静态化规则 论坛还是不行

[复制链接]
发表于 2009-6-4 20:04:38 | 显示全部楼层 |阅读模式
# Discuz
rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$   /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$   /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$  /viewthread.php?tid=$1&extra=page\%3D$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+)\.html$   /space.php?$1=$2 last;
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
break;

以前是Centos+apache
规则是:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
  RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
  RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
  RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
  RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
</IfModule>

DZ论坛的路径是 http://www.zuobama.com/bbs
迁移过来后在洞洞里面填写上这个规则。。

可以识别出来论坛的栏目地址,例如http://www.zuobama.com/bbs/thread-47230-1-1.html

可是就是没反应 进不去。。。 路径跟以前一样啊!没啥错误啊!!

[ 本帖最后由 zktq 于 2009-6-4 20:05 编辑 ]
发表于 2009-6-4 20:11:35 | 显示全部楼层
把/改成/bbs/
 楼主| 发表于 2009-6-4 20:14:27 | 显示全部楼层
问题解决!!!太爱你了!!!!!!哈哈
发表于 2009-6-4 22:34:20 | 显示全部楼层
原帖由 爱洞特漏 于 2009-6-4 20:11 发表
把/改成/bbs/

一语点醒我
http://www.zijidelu.com/thread-535-1-2.html
原来是要在网站的根目录下
谢谢
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2024-5-16 06:08 , Processed in 0.034946 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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