[经验]
win主机 Discuz! X1伪静态设置方法
|
|
win主机安装Discuz! X后的伪静态设设置:复制以下代码,另存为web.config,上传到论坛安装的目录下。经过本人在免费空间上测试可用。- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <system.webServer>
- <rewrite>
- <rules>
- <rule name="topic">
- <match url="^topic-(.+)\.html$" />
- <action type="Rewrite" url="portal.php?mod=topic&topic={R:1}" />
- </rule>
- <rule name="article">
- <match url="article-([0-9]+)\.html$" />
- <action type="Rewrite" url="portal.php?mod=view&aid={R:1}" />
- </rule>
- <rule name="forum">
- <match url="^forum-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
- <action type="Rewrite" url="forum.php?mod=forumdisplay&fid={R:1}&page={R:2}" appendQueryString="false" />
- </rule>
- <rule name="thread">
- <match url="^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" />
- <action type="Rewrite" url="forum.php?mod=viewthread&tid={R:1}&extra=page={R:2}&page={R:3}" />
- </rule>
- <rule name="group">
- <match url="^group-([0-9]+)-([0-9]+)\.html$" />
- <action type="Rewrite" url="forum.php?mod=group&fid={R:1}&page={R:2}" />
- </rule>
- <rule name="space">
- <match url="^space-(username|uid)-(.+)\.html$" />
- <action type="Rewrite" url="home.php?mod=space&{R:1}={R:2}" />
- </rule>
- <rule name="Xrewrite">
- <match url="^([a-z]+)-(.+)\.html$" />
- <action type="Rewrite" url="{R:1}.php?rewrite={R:2}" />
- </rule>
- </rules>
- </rewrite>
- <httpErrors errorMode="Detailed" />
- <asp scriptErrorSentToBrowser="true" />
- </system.webServer>
- <system.web>
- <customErrors mode="Off" />
- <globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" />
- </system.web>
- </configuration>
复制代码
[ 本帖最后由 yuwo 于 2010-7-23 04:12 PM 编辑 ] |
评分
-
查看全部评分
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-7-23 16:15:34
|
显示全部楼层
|
感谢分享. 不过这个好像和http://bbs.idcspy.com/thread-71669-1-1.html里重复 |
|
|
|
|
|
|
|
|
|
|
yuwo
发表于 2010-7-23 16:53:05
|
显示全部楼层
|
回复版主:是有区别的,适用于discuz!7.2的那个在x1下无效。而这个是没有问题的。 |
评分
-
查看全部评分
|
|
|
|
|
|
|
|
|
|
smartli
发表于 2010-7-23 18:07:30
|
显示全部楼层
|
为什么我的论坛就用不了.我非常不理解..用这个伪静就出现505错误.. |
|
|
|
|
|
|
|
|
|
|
yuwo
发表于 2010-7-24 01:14:17
|
显示全部楼层
回复 5# 的帖子
版主已经贴出来了,linux的这里有:http://bbs.idcspy.com/thread-71669-1-1.html
----------------豪华分隔线---------------------
回复4楼:你是win主机+PHP+mysql,然后用的是discuz! X1 吗?如果不是,那就是不适用于你的情况。如果是,那我也不知道啦,我用好着呀。 |
|
|
|
|
|
|
|
|
|
|
sun2008
发表于 2010-7-26 14:26:52
|
显示全部楼层
win主机+PHP+mysql,然后用的是discuz! X1
用这个伪静就出现505错误.. |
|
|
|
|
|
|
|
|
|
|
yuwo
发表于 2010-7-26 15:14:46
|
显示全部楼层
|
我的没有问题:http://www.nzmm.org/index.php |
|
|
|
|
|
|
|
|
|
|
sun2008
发表于 2010-7-26 16:24:29
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
yuwo
发表于 2010-7-26 22:03:30
|
显示全部楼层
原帖由 sun2008 于 2010-7-26 04:24 PM 发表 
把UTF-8修改成gb2312不能用,gbk编码
呵呵,看来要再加上一个条件:UTF-8编码 |
|
|
|
|
|
|
|
|
|
|
sun2008
发表于 2010-7-27 00:03:46
|
显示全部楼层
|
|
|
|
|
|
|
|