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

 找回密码
 立即注册
搜索

[已答复] 根目录有SS,也有DZ的IIS伪静态方法?

[复制链接]
yunying-s 发表于 2009-10-10 08:35:52 | 显示全部楼层 |阅读模式
本帖最后由 yunying-s 于 2009-10-15 21:29 编辑

在同一台服务器上,有二级域名绑定根目录的,例如bbs.dz.net
有根目录是SS,二级目录是BBS的,例如www.ss.net和www.ss.net/bbs
请问,此时的httpd.ini规则应该是如何的?
我用下面的规则时,bbs.dz.net会无法打开。

还是说,可以分站点设置不同httpd.ini,希望知道的人高招贵手,指点一下。


RewriteRule ^(.*)/archiver/((fid|tid)-[0-9]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$4
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag\.php\?name=$2&$3

RewriteRule ^/([0-9]+)$ /index\.php\?uid/$1 [L]
RewriteRule ^/([0-9]+)/spacelist(.+)$ /index\.php\?uid/$1/action/spacelist/type$2 [L]
RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?uid/$1/action/viewspace/itemid$2 [L]
RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?uid/$1/action/viewbbs/tid$2 [L]
RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?uid/$1/$2 [L]

RewriteRule ^/action(.+)$ /index\.php\?action$1 [L]
RewriteRule ^/category(.+)$ /index\.php\?action/category/catid$1 [L]
RewriteRule ^/viewnews(.+)$ /index\.php\?action/viewnews/itemid$1 [L]
RewriteRule ^/viewthread(.+)$ /index\.php\?action/viewthread/tid$1 [L]
RewriteRule ^/mygroup(.+)$ /index\.php\?action/mygroup/gid$1 [L]
回复

使用道具 举报

lidq.jingwu 发表于 2009-10-10 09:08:28 | 显示全部楼层
你是将两个规则混在一起用了吧,将ss的规则放到ss的目录下,将bbs的规则放到bbs的安装目录下。
回复

使用道具 举报

 楼主| yunying-s 发表于 2009-10-10 09:36:22 | 显示全部楼层
是的。因为之前朋友是用一个httpd.ini来控制全局的。
所以我就把二个规则都写进同一个httpd.ini文件了。
你的意思,是可以一个httpd.ini控制全局,再增加一个httpd.ini来控制www.ss.net的SS么?
回复

使用道具 举报

lidq.jingwu 发表于 2009-10-10 10:22:24 | 显示全部楼层
我将你的伪静态规则调整了,试一下吧;

RewriteRule ^/([0-9]+)$ /index\.php\?uid/$1 [L]
RewriteRule ^/([0-9]+)/spacelist(.+)$ /index\.php\?uid/$1/action/spacelist/type$2 [L]
RewriteRule ^/([0-9]+)/viewspace(.+)$ /index\.php\?uid/$1/action/viewspace/itemid$2 [L]
RewriteRule ^/([0-9]+)/viewbbs(.+)$ /index\.php\?uid/$1/action/viewbbs/tid$2 [L]
RewriteRule ^/([0-9]+)/(.*)$ /index\.php\?uid/$1/$2 [L]

RewriteRule ^/action(.+)$ /index\.php\?action$1 [L]
RewriteRule ^/category(.+)$ /index\.php\?action/category/catid$1 [L]
RewriteRule ^/viewnews(.+)$ /index\.php\?action/viewnews/itemid$1 [L]
RewriteRule ^/viewthread(.+)$ /index\.php\?action/viewthread/tid$1 [L]
RewriteRule ^/mygroup(.+)$ /index\.php\?action/mygroup/gid$1 [L]

RewriteRule ^(.*)/archiver/((fid|tid)-[0-9]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$4
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag\.php\?name=$2&$3
回复

使用道具 举报

 楼主| yunying-s 发表于 2009-10-10 10:41:15 | 显示全部楼层
好的。。晚点试完,再回复结果。。先感谢你的帮忙。
回复

使用道具 举报

 楼主| yunying-s 发表于 2009-10-10 10:49:50 | 显示全部楼层
因为朋友没有在线,还没有测试,我比较了一下。
好像仅是三段的顺序不一样了?
回复

使用道具 举报

 楼主| yunying-s 发表于 2009-10-13 22:51:30 | 显示全部楼层
本帖最后由 yunying-s 于 2009-10-15 20:49 编辑

还没有在线,再等等吧。
回复

使用道具 举报

zhoucunjie 发表于 2009-10-13 23:08:42 | 显示全部楼层
我也有类似的问题。空间所用的服务器是httpd.ini来控制全局的,不能单独设置。

当我的SS用httpd.ini规则时,自己的SS和BBS都很正常,别人的空间BBS就会出现问题。

现在用公用的HTTPD.INI时,我的论坛都正常,SS就只有论坛聚合页面出现问题,如viewthread-6841.html这类的伪静态就打不开了。我怀疑是viewthread的设置有冲突,请问如何解决?能给我一个httpd.ini设置吗
回复

使用道具 举报

lidq.jingwu 发表于 2009-10-14 09:34:12 | 显示全部楼层
8# zhoucunjie


    能将你的网址及服务器各个系统的安装路径发上来看一下吗?
回复

使用道具 举报

 楼主| yunying-s 发表于 2009-10-14 21:48:00 | 显示全部楼层
为8楼的老站长,再上这个帖子看看。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-11-23 20:19 , Processed in 0.135343 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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