全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
123
返回列表 发新帖
楼主: winok
打印 上一主题 下一主题

[疑问] 还是解决不了伪静态的问题,无奈再求助

[复制链接]
21#
 楼主| 发表于 2010-6-8 13:56:44 | 只看该作者
location forum/ {
            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;
        }

加了还是不行
22#
发表于 2010-6-8 14:03:24 | 只看该作者
肯定不行的啊 你又不是在根目录 而且你改的不对
这样试试 其他的也按照这样的改
location / {

            rewrite ^/forum/archiver/((fid|tid)-[\w\-]+\.html)$ /forum/archiver/index.php?$1 last;
23#
 楼主| 发表于 2010-6-8 14:17:55 | 只看该作者
location / {
            rewrite ^/forum/archiver/((fid|tid)-[\w\-]+\.html)$ /forum/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;
        }



加了还是不行,我的论坛在/wwwroot/forum

404 Not Found

--------------------------------------------------------------------------------

nginx/0.7.65
24#
发表于 2010-6-8 14:28:30 | 只看该作者
都要改的啊 无语

location / {

            rewrite ^/forum/archiver/((fid|tid)-[\w\-]+\.html)$ /forum/archiver/index.php?$1 last;

            rewrite ^/forum/forum-([0-9]+)-([0-9]+)\.html$ /forum/forumdisplay.php?fid=$1&page=$2 last;

            rewrite ^/forum/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /forum/viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;

            rewrite ^/forum/space-(username|uid)-(.+)\.html$ /forum/space.php?$1=$2 last;

            rewrite ^/forum/tag-(.+)\.html$ /forum/tag.php?name=$1 last;

            break;

        }

[ 本帖最后由 eudx 于 2010-6-8 14:30 编辑 ]

评分

参与人数 1威望 +5 收起 理由
winok + 5 感谢!

查看全部评分

25#
 楼主| 发表于 2010-6-8 14:33:16 | 只看该作者
已经成功,十分感谢!!!!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-14 21:00 , Processed in 0.061005 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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