基于 Joekoe CMS 3.0 安装和使用ISAPI_Rewrite(模拟静态地址)!


点击下载此文件1、首先请按以下地址下载ISAPI_Rewrite组件;
http://cms.joekoe.com/public/download/?rewrite

2、解压,并放在C盘(其它地方也可),如我们举例的放置目录及文件结构:

C:\rewrite
C:\rewrite\ISAPI_Rewrite.dll
C:\rewrite\httpd.ini
(压缩包里的该配置文件即为CMS 3.0所要用的正确配置,无需额外修改)

如果您的服务器设置过权限,要给C:\rewrite\目录以您要设置的网站以相应的权限,也可以直接设成Everyone可读取和动行的权限;

3、安装ISAPI_Rewrite,打开IIS,点击您的站点右键到属性窗口,图例如下:



添加成功后,重启IIS,再回到这个ISAPI筛选页面看看这里是不是绿色的,绿色表示ISAPI_Rewrite组件已经工作了,红色表示有问题,一般是权限的问题导致;

4、最重要的一步,以超级管理员的模式登陆到3.0的后台核心管理,点击频道管理,频道模块,假设点击文章模块的编辑项,在页面表单里有一项“Rewrite地址”,该输入框的值的前几个字符为“exec=;....”,将之改成“exec=yes;....”即在“exec=”后面加一个“yes”,提交配置后即可

5、点击模板管理,将文章模块的页面以及首页重新生成一下,现在看看是不是地址变了?

6、其它栏目也可以设置成Rwrite模式,方法同第4和第5步操作。

我们的客户服务器将在近期统一安装该组件。


附:适应于 Joekoe CMS 3.0 最新版本的ISAPI_Rewrite“httpd.ini”文件内容:

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32
RewriteRule /forum/list_(\d+)\.html /forum/list\.asp\?fid=$1 [N,I]
RewriteRule /forum/list_(\d+)_(\d+)\.html /forum/list\.asp\?fid=$1&page=$2 [N,I]
RewriteRule /forum/view_(\d+)\.html /forum/view\.asp\?id=$1 [N,I]
RewriteRule /forum/view_(\d+)_(\d+)\.html /forum/view\.asp\?id=$1&page=$2 [N,I]

RewriteRule /forum/list_(\d+).(\d+)\.html /forum/list\.asp\?fid=$1&tipid=$2 [N,I]
RewriteRule /forum/list_(\d+).(\d+)_(\d+)\.html /forum/list\.asp\?fid=$1&tipid=$2&page=$3 [N,I]
RewriteRule /forum/view_(\d+),(\d+)\.html /forum/view\.asp\?id=$1&p=$2 [N,I]
RewriteRule /forum/view_(\d+),(\d+)_(\d+)\.html /forum/view\.asp\?id=$1&p=$2&page=$3 [N,I]

RewriteRule /news/list_(\d+)\.html /news/list\.asp\?classid=$1 [N,I]
RewriteRule /news/list_(\d+)_(\d+)\.html /news/list\.asp\?classid=$1&page=$2 [N,I]
RewriteRule /news/view_(\d+)\.html /news/view\.asp\?id=$1 [N,I]
RewriteRule /news/view_(\d+)_(\d+)\.html /news/view\.asp\?id=$1&page=$2 [N,I]

RewriteRule /article/list_(\d+)\.html /article/list\.asp\?classid=$1 [N,I]
RewriteRule /article/list_(\d+)_(\d+)\.html /article/list\.asp\?classid=$1&page=$2 [N,I]
RewriteRule /article/view_(\d+)\.html /article/view\.asp\?id=$1 [N,I]
RewriteRule /article/view_(\d+)_(\d+)\.html /article/view\.asp\?id=$1&page=$2 [N,I]

RewriteRule /down/list_(\d+)\.html /down/list\.asp\?classid=$1 [N,I]
RewriteRule /down/list_(\d+)_(\d+)\.html /down/list\.asp\?classid=$1&page=$2 [N,I]
RewriteRule /down/view_(\d+)\.html /down/view\.asp\?id=$1 [N,I]
RewriteRule /down/view_(\d+)_(\d+)\.html /down/view\.asp\?id=$1&page=$2 [N,I]

RewriteRule /gallery/list_(\d+)\.html /gallery/list\.asp\?classid=$1 [N,I]
RewriteRule /gallery/list_(\d+)_(\d+)\.html /gallery/list\.asp\?classid=$1&page=$2 [N,I]
RewriteRule /gallery/view_(\d+)\.html /gallery/view\.asp\?id=$1 [N,I]
RewriteRule /gallery/view_(\d+)_(\d+)\.html /gallery/view\.asp\?id=$1&page=$2 [N,I]

RewriteRule /shop/list_(\d+)\.html /shop/list\.asp\?classid=$1 [N,I]
RewriteRule /shop/list_(\d+)_(\d+)\.html /shop/list\.asp\?classid=$1&page=$2 [N,I]
RewriteRule /shop/view_(\d+)\.html /shop/view\.asp\?id=$1 [N,I]
RewriteRule /shop/view_(\d+)_(\d+)\.html /shop/view\.asp\?id=$1&page=$2 [N,I]

RewriteRule /video/list_(\d+)\.html /video/list\.asp\?classid=$1 [N,I]
RewriteRule /video/list_(\d+)_(\d+)\.html /video/list\.asp\?classid=$1&page=$2 [N,I]
RewriteRule /video/view_(\d+)\.html /video/view\.asp\?id=$1 [N,I]
RewriteRule /video/view_(\d+)_(\d+)\.html /video/view\.asp\?id=$1&page=$2 [N,I]
 

[本日志由 cmscn 于 2008-01-17 00:40 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 8 | 引用: 0 | 查看次数: 924
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭