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

 找回密码
 立即注册
搜索

[求助] WIN虚拟空间域名去除forum.php、index.php的方法。301跳转规则!

[复制链接]
记忆D羁绊 发表于 2013-3-28 17:54:14 | 显示全部楼层 |阅读模式
本帖最后由 记忆D羁绊 于 2014-4-27 23:14 编辑

更新至2014.04.27
希望对大家有用,下面是完整的WIN虚拟空间的httpd.ini配置
配置内容:
1.域名.com永久跳转到www.域名.com
2.www.域名.com/forum.php,永久跳转到www.域名.com
3.www.域名.com/index.php,永久跳转到www.域名.com
4.论坛静态规则。

关于大家说用不了,我也很奇怪,我的网站用这个没问题哦,我也不知道什么情况。
这就主页的权重就不用担心被分散了。。。。用法:把下面的代码内容粘贴到文本工具,把中文“域名”改为你的网站域名,然后另存文件名为httpd.ini 格式为所有文件,然后把刚存的httpd.ini 上传到网站根目录。注意后台开启静态哦!叫我雷锋吧!

  1. <font size="3">[ISAPI_Rewrite]
  2. CacheClockRate 3600
  3. RepeatLimit 32
  4. RewriteCond Host: ^域名.com$
  5. RewriteRule (.*) http\://www\.域名\.com$1 [I,RP]
  6. RewriteRule (.*)/forum.php$ http://www.域名.com\ [I,RP]
  7. RewriteRule (.*)/index.php$ http://www.域名.com\ [I,RP]

  8. RewriteRule ^(.*)/topic-(.+)\.html(\?(.*))*$ $1/portal\.php\?mod=topic&topic=$2&$4
  9. RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/portal\.php\?mod=view&aid=$2&page=$3&$5
  10. RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$5
  11. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$6
  12. RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=group&fid=$2&page=$3&$5
  13. RewriteRule ^(.*)/space-(username|uid)-(.+)\.html(\?(.*))*$ $1/home\.php\?mod=space&$2=$3&$5
  14. RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/home\.php\?mod=space&uid=$2&do=blog&id=$3&$5
  15. RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html(\?(.*))*$ $1/index\.php\?action=$2&value=$3&$5
  16. RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html(\?(.*))*$ $1/plugin\.php\?id=$2:$3&$5</font>
复制代码




回复

使用道具 举报

水分子 发表于 2013-3-28 17:55:04 | 显示全部楼层
分享==美德
回复

使用道具 举报

morning_sunligh 发表于 2013-3-28 18:12:30 来自手机 | 显示全部楼层
支持一下!!
回复

使用道具 举报

guitarqiang 发表于 2013-3-28 20:11:54 | 显示全部楼层
有门户、有论坛,你怎么分开?
回复

使用道具 举报

lqh3397787 发表于 2013-3-28 20:32:30 | 显示全部楼层
好像不行哦
回复

使用道具 举报

dkjxj 发表于 2013-3-28 21:30:59 | 显示全部楼层
希望有用
回复

使用道具 举报

小柒iphone 发表于 2013-3-28 21:47:48 | 显示全部楼层
哇~~  谢谢{:soso_e121:}
回复

使用道具 举报

小柒iphone 发表于 2013-3-28 21:48:18 | 显示全部楼层
是否永久301域名跳转呢
回复

使用道具 举报

小柒iphone 发表于 2013-3-28 21:51:43 | 显示全部楼层
xxx.cn跳转wwwxxx.cn么?
回复

使用道具 举报

lqh3397787 发表于 2013-3-28 22:12:20 | 显示全部楼层
复制代码放在哪里?
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-9-13 07:04 , Processed in 0.087258 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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