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

 找回密码
 立即注册
搜索

[疑问] 帮我看看伪静态哪里错了

[复制链接]
jnbar 发表于 2009-9-23 14:03:53 | 显示全部楼层 |阅读模式
.htaccess 上传之后
缓存完。
我的站是www.love021.com


我的地址为http://www.love021.com/viewnews-358 打不开的。。
尝试这样可以打开。。http://www.love021.com/?viewnews-358

正确的应该是http://www.love021.com/viewnews-358 .html 吧?


郁闷了。。哪里不对。。


.htaccess 内容。。。
  1. # 将 RewriteEngine 模式打开
  2. RewriteEngine On

  3. # 修改以下语句中的 /supesite 修改为你的SupeSite目录地址

  4. ,如果程序放在根目录中,请将 /supesite 修改为 /
  5. RewriteBase /

  6. # Rewrite 系统规则请勿修改
  7. RewriteRule ^([0-9]+)/spacelist(.+)$ index.php?uid/

  8. $1/action/spacelist/type$2 [L]
  9. RewriteRule ^([0-9]+)/viewspace(.+)$ index.php?uid/

  10. $1/action/viewspace/itemid$2 [L]
  11. RewriteRule ^([0-9]+)/viewbbs(.+)$ index.php?uid/

  12. $1/action/viewbbs/tid$2 [L]
  13. RewriteRule ^([0-9]+)/(.*)$ index.php?uid/$1/$2 [L]
  14. RewriteRule ^([0-9]+)$ index.php?uid/$1 [L]
  15. RewriteRule ^action(.+)$ index.php?action$1 [L]
  16. RewriteRule ^category(.+)$ index.php?

  17. action/category/catid$1 [L]
  18. RewriteRule ^viewnews(.+)$ index.php?

  19. action/viewnews/itemid$1 [L]
  20. RewriteRule ^viewthread(.+)$ index.php?

  21. action/viewthread/tid$1 [L]
  22. RewriteRule ^mygroup(.+)$ index.php?action/mygroup/gid$1

  23. [L]
复制代码
回复

使用道具 举报

我是传说 发表于 2009-9-23 14:11:22 | 显示全部楼层
你的服务器支不支持URL 静态化啊
回复

使用道具 举报

我是传说 发表于 2009-9-23 14:14:26 | 显示全部楼层
.html后缀你在后台设置下就可以了
回复

使用道具 举报

 楼主| jnbar 发表于 2009-9-23 14:22:39 | 显示全部楼层
支持静态化的。。
加了后缀名.html

http://www.love021.com/viewnews-358.html 无法打开
http://www.love021.com/?viewnews-358.html 这样可以打开。。。。是哪里出问题了。。
回复

使用道具 举报

littlehz 发表于 2009-9-23 15:04:25 | 显示全部楼层
1、要确认服务器支持Rewrite。
2、使用正确的Rewrite规则,一行rewrite规则中不能换行。
3、IIS的服务器放置了Rewrite规则,需要手动重新加载规则,不会立即生效。咨询服务商
回复

使用道具 举报

 楼主| jnbar 发表于 2009-9-23 15:29:00 | 显示全部楼层
帮我看看这个代码没有错吧。。。

  1. RewriteEngine On

  2. RewriteBase /

  3. RewriteRule ^([0-9]+)/spacelist(.+)$ index.php?uid/

  4. $1/action/spacelist/type$2 [L]
  5. RewriteRule ^([0-9]+)/viewspace(.+)$ index.php?uid/

  6. $1/action/viewspace/itemid$2 [L]
  7. RewriteRule ^([0-9]+)/viewbbs(.+)$ index.php?uid/

  8. $1/action/viewbbs/tid$2 [L]
  9. RewriteRule ^([0-9]+)/(.*)$ index.php?uid/$1/$2 [L]
  10. RewriteRule ^([0-9]+)$ index.php?uid/$1 [L]
  11. RewriteRule ^action(.+)$ index.php?action$1 [L]
  12. RewriteRule ^category(.+)$ index.php?

  13. action/category/catid$1 [L]
  14. RewriteRule ^viewnews(.+)$ index.php?

  15. action/viewnews/itemid$1 [L]
  16. RewriteRule ^viewthread(.+)$ index.php?

  17. action/viewthread/tid$1 [L]
  18. RewriteRule ^mygroup(.+)$ index.php?action/mygroup/gid$1

  19. [L]
复制代码
回复

使用道具 举报

 楼主| jnbar 发表于 2009-9-23 15:31:36 | 显示全部楼层
?viewnews 可以链接成功
viewnews 无法连接。。。

这个“?”我很郁闷。。有高手可以帮忙解答下吗
回复

使用道具 举报

lidq.jingwu 发表于 2009-9-23 15:37:06 | 显示全部楼层
  1. RewriteEngine On

  2. RewriteBase /

  3. RewriteRule ^([0-9]+)/spacelist(.+)$ index.php?uid/$1/action/spacelist/type$2 [L]
  4. RewriteRule ^([0-9]+)/viewspace(.+)$ index.php?uid/$1/action/viewspace/itemid$2 [L]
  5. RewriteRule ^([0-9]+)/viewbbs(.+)$ index.php?uid/$1/action/viewbbs/tid$2 [L]
  6. RewriteRule ^([0-9]+)/(.*)$ index.php?uid/$1/$2 [L]
  7. RewriteRule ^([0-9]+)$ index.php?uid/$1 [L]

  8. RewriteRule ^action(.+)$ index.php?action$1 [L]
  9. RewriteRule ^category(.+)$ index.php?action/category/catid$1 [L]
  10. RewriteRule ^viewnews(.+)$ index.php?action/viewnews/itemid$1 [L]
  11. RewriteRule ^viewthread(.+)$ index.php?action/viewthread/tid$1 [L]
  12. RewriteRule ^mygroup(.+)$ index.php?action/mygroup/gid$1 [L]
复制代码
用这个试一下,你的换行太多了。
回复

使用道具 举报

 楼主| jnbar 发表于 2009-9-23 21:06:40 | 显示全部楼层
还是没有解决。。
回复

使用道具 举报

littlehz 发表于 2009-9-23 22:51:30 | 显示全部楼层
给出的规则无误,请资讯服务商是否加载了rewrite规则
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-9-13 21:44 , Processed in 0.080453 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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