Archiver fid 404 解决了论坛Archiver出现404错误的问题

  • 2
  • 5,031 views

Discuz的Archiver功能可以让看帖时页面更简洁,对搜索引擎更友好。

但是,论坛的Archiver却一直有个问题:

这样的页面会显示404错误

http://www.miliol.com/archiver/fid-2.html

但是如果把网址改成

http://www.miliol.com/archiver/?fid-2.html

就可以显示了,真是神奇的问号。

为此,Google管理员工具一直提示有死链接,收到N个警告信息。

今天在搜索引擎上不停的搜索,发现这个帖子:

http://www.discuz.net/thread-920400-1-1.html

便按照友友回复的方法把

RewriteRule ^archiver/([a-z0-9\-]+\.html)$ archiver/index.php?$1

修改为

RewriteRule ^archiver/((fid|tid)-[\w\-]+\.html)$ archiver/index.php?$1

刚才测试一下,果然正常了!特此记录分享给大家。

米粒在线
  • 本文由 发表于 2012年12月17日00:46:48
  • 转载请务必保留本文链接:https://www.miliol.org/2390.html
生活道理

熬夜如何改变了我们的身体

熬夜的危害有很多,如:经常感到疲劳,免疫力下降:人经常熬夜造成的后遗症,最严重的就是疲劳、精神不振;人体的免疫力也会跟着下降,感冒、胃肠感染、过敏等等自律神经失调症状都会出现。 头痛:熬夜的隔天,上班...
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

评论:2   其中:访客  2   博主  0
    • 博主你好 博主你好 0

      请问博主知道nginx 下的伪静态怎么修改吗,我也是这个问题

        • 米粒在线 米粒在线

          @ 博主你好 rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
          rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
          rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
          rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
          rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
          rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
          rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
          rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last;
          rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last;
          if (!-e $request_filename) {
          return 404;
          }