伪静态利于搜索引擎,这是SEO的普遍说法,所以当我们去购买主机的时候第一件要考虑的就是主机是否支持伪静态,下面就介绍下只是伪静态的美国主机bluehost,以及bluehost主机在Discuz中伪静态设置方法。
Bluehost虚拟主机Discuz伪静态设置:
第一步,打开RewriteEngine 模式,编辑网站根目录下的.htaccess文件使之与以下内容一致(*以下规则为Discuz! 6.1.0版)。
创建/编辑一个.htaccess放在网站的根目录。在.htaccess中输入一下代码。(用记事本创建.htaccess,注意.htaccess文件没有后缀)
# 将 RewriteEngine 模式打开
RewriteEngine on
# 修改论坛目录地址
RewriteBase /
# Rewrite 系统规则请勿修改
RewriteRule ^archiver/((fid|tid)-[\w\-]+\.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 ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
第二步,在Discuz后台根据自己的需要做相应的设置调整即可。




No Comments