找回密码
 加入我们
搜索
      
查看: 4063|回复: 0

DS713+ DSM5.0建的Discuz! X3.1论坛如何设置url 伪静态 ?

[复制链接]
发表于 2014-5-23 22:06 | 显示全部楼层 |阅读模式
如题,请教。
  1. Apache Web Server(独立主机用户)
  2. <IfModule mod_rewrite.c>
  3.         RewriteEngine On
  4.         RewriteCond %{QUERY_STRING} ^(.*)$
  5.         RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1
  6.         RewriteCond %{QUERY_STRING} ^(.*)$
  7.         RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&%1
  8.         RewriteCond %{QUERY_STRING} ^(.*)$
  9.         RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3&%1
  10.         RewriteCond %{QUERY_STRING} ^(.*)$
  11.         RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3&%1
  12.         RewriteCond %{QUERY_STRING} ^(.*)$
  13.         RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&%1
  14.         RewriteCond %{QUERY_STRING} ^(.*)$
  15.         RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3&%1
  16.         RewriteCond %{QUERY_STRING} ^(.*)$
  17.         RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3&%1
  18. </IfModule>
  19. Apache Web Server(虚拟主机用户)
  20. # 将 RewriteEngine 模式打开
  21. RewriteEngine On

  22. # 修改以下语句中的 /discuz 为您的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
  23. RewriteBase /discuz

  24. # Rewrite 系统规则请勿修改
  25. RewriteCond %{QUERY_STRING} ^(.*)$
  26. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
  27. RewriteCond %{QUERY_STRING} ^(.*)$
  28. RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
  29. RewriteCond %{QUERY_STRING} ^(.*)$
  30. RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
  31. RewriteCond %{QUERY_STRING} ^(.*)$
  32. RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
  33. RewriteCond %{QUERY_STRING} ^(.*)$
  34. RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
  35. RewriteCond %{QUERY_STRING} ^(.*)$
  36. RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1
  37. RewriteCond %{QUERY_STRING} ^(.*)$
  38. RewriteRule ^([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ plugin.php?id=$1:$2&%1
复制代码
两段规则,不知用哪一个好。


您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

Archiver|手机版|小黑屋|Chiphell ( 沪ICP备12027953号-5 )沪公网备310112100042806 上海市互联网违法与不良信息举报中心

GMT+8, 2024-11-23 03:52 , Processed in 0.008134 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2007-2024 Chiphell.com All rights reserved.

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