Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

UCH静态化的httpd.ini文件怎么写?

[复制链接]
dongqingtree 发表于 2009-8-10 08:38:56 | 显示全部楼层 |阅读模式
我的uch安装在home子目录下,dz安装在bbs子目录下
子目录分别绑定了域名http://home.linmiaoke.comhttp://bbs.linmiaoke.com
而网站根目录绑定的是http://www.linmiaoke.com
在静态化的过程中,我已经对这三个域名都实现了静态化
也就是说http://home.linmiaoke.com/space-home.html已经可以访问了
但使用http://www.linmiaoke.com/home/space-home.html却不行
空间提供商那边要我上传一个httpd.ini文件到根目录下

而对于DZ,使用下面的httpd.ini已经完成了http://bbs.linmiaoke.comhttp://www.linmiaoke.com/bbs两种方式的静态化
  1. [ISAPI_Rewrite]

  2. # 3600 = 1 hour
  3. CacheClockRate 3600

  4. RepeatLimit 32

  5. # Protect httpd.ini and httpd.parse.errors files
  6. # from accessing through HTTP

  7. RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$4
  8. RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4
  9. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\%3D$4&page=$3&$4
  10. RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
  11. RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag\.php\?name=$2&$3
复制代码
我在httpd.ini文件中也尝试添加
  1. RewriteRule ^/(space|network)\-(.+)\.html$ /$1.php?rewrite=$2 [L]
  2. RewriteRule ^/(space|network)\.html$ /$1.php [L]
  3. RewriteRule ^/([0-9]+)$ /space.php?uid=$1 [L]
复制代码
http://www.linmiaoke.com/home/space-home.html依然无法访问
请教各位,关于这个该怎么解决?
回复

使用道具 举报

 楼主| dongqingtree 发表于 2009-8-10 08:48:38 | 显示全部楼层
自己的问题自己解决,关于uch的代码应该这样加
  1. RewriteRule ^/home/(space|network)-(.+)\.html$ /home/$1\.php\?rewrite=$2 [L]
  2. RewriteRule ^/home/(space|network)\.html$ /home/$1\.php [L]
  3. RewriteRule ^/home/([0-9]+)$ /home/space\.php\?uid=$1 [L]
复制代码
回复

使用道具 举报

coldhair 发表于 2009-9-23 19:57:32 | 显示全部楼层
终于搜索到解决的方法了,太好了,成功实现伪静态,谢谢
回复

使用道具 举报

花舞剑 发表于 2009-9-23 20:02:09 | 显示全部楼层
楼主能否告之是怎么加的?我也想知道!((em:12))
回复

使用道具 举报

vipau 发表于 2009-10-10 20:30:26 | 显示全部楼层
测试以下

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-13 01:03 , Processed in 0.106464 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表