Discuz x2.0 伪静态办理要领(IIS篇)

[摘要]Discuz x2伪静态困扰了许多站长,官方迟迟不给出来办理方案,亏得有热心站长连续宣布了靠得住的办理步伐,本篇先容Discuz x2.0 for IIS伪静态办理要领。

Discuz x2.0的宣布引起万千站长猖獗下载进级利用,而大大都站长,在进级或新安装后,都发明Discuz x2.0的伪静态不生效,小编通过汇集相关资料,发明这是官方宣布Discuz x2.0时留下的一个BUG,只要通过小小的修改就能实现伪静态了。

好了,费话少说了,现转入正题。

首先要将这个BUG办理先,打开../source/function/function_core.php这个文件。

查找代码:

$_G['setting']['output']['preg']['search'] = str_replace('\{CURHOST\}', preg_quote($_G['siteurl']), $_G['setting']['output']['preg']['search']);

换成:

$_G['setting']['output']['preg']['search'] = str_replace('\{CURHOST\}', preg_quote($_G['siteurl'], 'http://down.chinaz.com/'), $_G['setting']['output']['preg']['search']);

生成的httpd.ini放在根目次下:

[ISAPI_Rewrite]

CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini 0758z.com parse.errors files
# 肇庆阳光社区规侧如下:from accessing through HTTP
RewriteRule ^(.*)/topic-(.+)\.html(\?(.*))*$ $1/portal\.php\?mod=topic&topic=$2&$4
RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/portal\.php\?mod=view&aid=$2&page=$3&$5
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$5
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$6
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=group&fid=$2&page=$3&$5
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html(\?(.*))*$ $1/home\.php\?mod=space&$2=$3&$5
RewriteRule ^(.*)/([a-z]+)-(.+)\.html(\?(.*))*$ $1/$2\.php\?rewrite=$3&$5

问题办理!

Discuz x2.0下载

Discuz! X2 R20120628 简体GBK下载

Discuz x2.0 伪静态治理方式(IIS篇)

界面预览

分享到

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/10679.html