Bluehost虚拟主机如何设置实现phpwind的伪静态
|
|
在网上找过了一些文章 有介绍如何设置DZ的伪静态的 但是没怎么看懂。。请高手指教 再线等。。
# 将 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 |
|
|
|
|
|
|
|
|
|
|
kenmi
发表于 2009-7-11 18:40:23
|
显示全部楼层
这是phpwind 部署伪静态的说明 没怎么看懂
以apache服务器为例介绍使用方法.
1.在静态目录部署中,开启静态目录部署功能,将静态目录设置为"-htm-",将静态目录扩展名设置为:".html"
默认的URL形式为 "http://www.phpwind.net/thread.php?fid=2"
新的URL形式为 "http://www.phpwind.net/thread-htm-fid-2.html"
这种纯静态形式的URL更易被搜索引擎收录
2.Apache Web Server 的配置
首先确定加载了 Mod_rewrite 模块,方法: 检查 conf/httpd.conf 中是否存在以下两段代码 (具体路径可能会有所不同,但形式基本是一样的):
(一)LoadModule rewrite_module libexec/mod_rewrite.so
(二)AddModule mod_rewrite.c
如果存在,那么在配置文件(通常就是conf/httpd.conf)中加入如下代码。此时须注意,如果网站使用通过虚拟主机来定义,请务必加到虚拟主机配置中去,否则可能无法使用。改好后然后将 Apache 重启.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
</IfModule> |
|
|
|
|
|
|
|
|
|
|
kenmi
发表于 2009-7-11 18:44:47
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
一路同行
发表于 2009-7-11 19:18:26
|
显示全部楼层
论坛里有好多这样的说明 |
|
|
|
|
|
|
|
|