全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 2580|回复: 24
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
1#
发表于 2010-6-8 11:02:13 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
昨天VPSYOU客服帮忙设置好了,可以正常用伪静态。但因为软件问题换了一个LNMP,客服不在...所以想请教设置方法

已经有discuz.conf和在nginx.conf里面加了include语句,但还是不能伪静态,一点伪静态连接就出现404.(DISCUZ7.2)

希望指导一下,谢谢
25#
 楼主| 发表于 2010-6-8 14:33:16 | 只看该作者
已经成功,十分感谢!!!!!!!
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 感谢!

查看全部评分

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

            rewrite ^/forum/archiver/((fid|tid)-[\w\-]+\.html)$ /forum/archiver/index.php?$1 last;
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;
        }

加了还是不行
20#
发表于 2010-6-8 13:08:11 | 只看该作者
原帖由 winok 于 2010-6-8 12:28 发表
discuz.conf加上forum了,但nginx.conf加上forum就显示错误.....

discuz.conf里面加上就行了,不要动nginx.conf文件
19#
 楼主| 发表于 2010-6-8 12:28:44 | 只看该作者
discuz.conf加上forum了,但nginx.conf加上forum就显示错误.....
18#
发表于 2010-6-8 12:28:01 | 只看该作者
加上forum啊
17#
 楼主| 发表于 2010-6-8 12:26:11 | 只看该作者
还是不行。郁闷啊........
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-15 16:24 , Processed in 0.068071 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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