Longlan的私人Blog

Dreamhost上实现Discuz!6.0、6.1.0伪静态化

Dreamhost上实现Discuz!6.0、6.1.0伪静态化
为了迎接康盛推出Discuz!6.1.0
特发布一个教程 让在Dreamhost主机上的Discuz!论坛实现伪静态化
可应用版本:Discuz!6.0.0 Discuz!6.1.0(测试版)
Options +FollowSymLinks
# 将 RewriteEngine 模式打开
RewriteEngine On
# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteBase /

# Rewrite 系统规则请勿修改
RewriteRule ^archiver/([a-z0-9-]+.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+).html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+).html$ viewthread.php?tid=$1&extra=page%3D$3&page=$2
RewriteRule ^profile-(username|uid)-(.+).html$ viewpro.php?$1=$2
RewriteRule ^space-(username|uid)-(.+).html$ space.php?$1=$2
RewriteRule ^tag-(.+).html$ tag.php?name=$1

由于windows下不支持.htaccess文件,因此将上面的代码保存为一个文本文件,将这个文本文件传到DH的空间后改名为.htaccess,然后在后台管理中的“基本设置-搜索引擎优化”中选择“URL 静态化”的相应的值,即可实现在dreamhost空间中的discuz的伪静态化。
伪静态化后的样例可访问:http://bbs.jxcia.net
(增加了tag.php对应的rewrite规则 2007-8-23)
我把写好的.htaccess文件给大家,大家直接上传到论坛的根目录就可以了!
htaccess.zip (370 Bytes)

htaccess.zip (370 Bytes)
下载次数: 262

2008-4-20 15:53

^_^  希望这个教程对大家有帮助!
P.S.:我DH主机上的DZ论坛已经顺利升级为6.1.0,没有任何问题!(升级为测试版的6.1.0,主要是为了主站升级做测试!)
内容主要信息转载自:http://www.lifangjin.com/archives/378

赞(0) 打赏
未经允许不得转载:似水流年 » Dreamhost上实现Discuz!6.0、6.1.0伪静态化

评论 1

  1. #1

    Anyway these are some great tips & these posts are even better. ,

    Wolf2915年前 (2009-10-14)回复

Longlan的私人Blog

联系我关于我