Discuz7.x备份数据互补 Discuz7.2合并 Discuz!NT转Discuz7.2 DV.Net转Discuz7.2 UC1.5合并
Discuz!X1备份数据互补 Discuz!X1合并 Discuz!NT转Discuz!X1 Phpwind7.5转Discuz!NT3.1 UC1.6合并
Discuz!X1.5备份数据互补 Discuz!X1.5合并 Discuz!NT转Discuz!X1.5 Discuz!X1转Discuz!NT3.1 BBSMAX5转DX2
Discuz!X2备份数据互补 Discuz!X2合并 Discuz!NT转Discuz!X2 Discuz!X1.5转Discuz!NT3.5
Discuz!X2.5备份数据互补 Discuz!X2.5合并 Discuz!NT转Discuz!X2.5 dvbbs转Discuz!X2.5
Phpwind转Discuz!NT3.5 Discuz!X3合并 Discuz!NT转Discuz!X3 dvbbs转Discuz!X3
phpwind转Discuz!X3.1 Discuz!X3.1合并 Discuz!NT转Discuz!X3.1 dvbbs转Discuz!X3.1
phpwind转Discuz!X3.2 Discuz!X3.2合并 Discuz!NT转Discuz!X3.2 dvbbs转Discuz!X3.2
phpwind转Discuz!X3.3 Discuz!X3.3合并 Discuz!NT转Discuz!X3.3 dvbbs转Discuz!X3.3
返回列表 回复 发帖

dvbbs=>Discuz! X保持搜索引擎带来的流量之rewrite 规则(apache版和IIS版)

最近给一个客户写的,分享一下给用得上的人吧。呵呵

IIS版
  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 ^(.*)/index\.asp\?[bB]oard[iI][dD]=(\d+)$ $1/forum\.php\?mod=forumdisplay&fid=$2
  8. RewriteRule ^(.*)/dispbbs\.asp\?[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)$ $1/forum\.php\?mod=viewthread&tid=$3
  9. RewriteRule ^(.*)/index\.asp\?[bB]oard[iI][dD]=(\d+)&[pP]age=(\d+)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3
  10. RewriteRule ^(.*)/dispbbs\.asp\?[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&page=(\d+)$ $1/forum\.php\?mod=viewthread&tid=$3&page=$4
  11. RewriteRule ^(.*)/dispbbs\.asp\?[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&authorid=(\d+)$ $1/forum\.php\?mod=viewthread&tid=$3&page=1&authorid=$4
  12. RewriteRule ^(.*)/dispbbs\.asp\?[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&authorid=(\d+)&page=(\d+)&star=(\d+)$ $1/forum\.php\?mod=viewthread&tid=$3&page=$6
  13. RewriteRule ^(.*)/topic-(.+)\.html(\?(.*))*$ $1/portal\.php\?mod=topic&topic=$2&$4
  14. RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/portal\.php\?mod=view&aid=$2&page=$3&$5
  15. RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$5
  16. RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$6
  17. RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=group&fid=$2&page=$3&$5
  18. RewriteRule ^(.*)/space-(username|uid)-(.+)\.html(\?(.*))*$ $1/home\.php\?mod=space&$2=$3&$5
  19. RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/home\.php\?mod=space&uid=$2&do=blog&id=$3&$5
  20. RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html(\?(.*))*$ $1/index\.php\?action=$2&value=$3&$5
  21. RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html(\?(.*))*$ $1/plugin\.php\?id=$2:$3&$5
复制代码
Apache版
  1. <IfModule mod_rewrite.c>
  2. # 将 RewriteEngine 模式打开
  3. RewriteEngine On

  4. # Rewrite 系统规则请勿修改

  5. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)$
  6. RewriteRule ^index\.asp$ forum.php?mod=forumdisplay&fid=%1 [L]
  7. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=([0-9]+)&[iI][dD]=([0-9]+)$
  8. RewriteRule ^dispbbs\.asp$ forum.php?mod=viewthread&tid=%2 [L]
  9. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)&[pP]age=(\d+)$
  10. RewriteRule ^index\.asp$ forum.php?mod=forumdisplay&fid=%1&page=%2 [L]
  11. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)&TopicMode=(\d+)&List_Type=&[pP]age=(\d+)$
  12. RewriteRule ^index\.asp$ forum.php?mod=forumdisplay&fid=%1&page=%3 [L]
  13. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&[pP]age=(\d+)$
  14. RewriteRule ^dispbbs\.asp$ forum.php?mod=viewthread&tid=%2&page=%3 [L]
  15. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&authorid=(\d+)$
  16. RewriteRule ^dispbbs\.asp$ forum.php?mod=viewthread&tid=%2&page=1&authorid=%3 [L]
  17. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&authorid=(\d+)&[pP]age=(\d+)&star=(\d+)$
  18. RewriteRule ^dispbbs\.asp$ forum.php?mod=viewthread&tid=%2&page=%4&authorid=%3 [L]
  19. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&[pP]age=(\d+)&move=next$
  20. RewriteRule ^dispbbs\.asp$ forum.php?mod=viewthread&tid=%2&page=%3 [L]
  21. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&[pP]age=(\d+)&star=(\d+)$
  22. RewriteRule ^dispbbs\.asp$ forum.php?mod=viewthread&tid=%2&page=%3 [L]
  23. RewriteCond %{QUERY_STRING}  ^[bB]oard[iI][dD]=(\d+)&[iI][dD]=(\d+)&star=(\d+)$
  24. RewriteRule ^dispbbs\.asp$ forum.php?mod=viewthread&tid=%2 [L]

  25. RewriteCond %{QUERY_STRING} ^(.*)$
  26. RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
  27. RewriteCond %{QUERY_STRING} ^(.*)$
  28. RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
  29. RewriteCond %{QUERY_STRING} ^(.*)$
  30. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
  31. RewriteCond %{QUERY_STRING} ^(.*)$
  32. RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
  33. RewriteCond %{QUERY_STRING} ^(.*)$
  34. RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
  35. RewriteCond %{QUERY_STRING} ^(.*)$
  36. RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
  37. RewriteCond %{QUERY_STRING} ^(.*)$
  38. RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
  39. RewriteCond %{QUERY_STRING} ^(.*)$
  40. RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1
  41. RewriteCond %{QUERY_STRING} ^(.*)$
  42. RewriteRule ^([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ plugin.php?id=$1:$2&%1
  43. </IfModule>
复制代码

伪静态规则.rar (1.57 KB)

业务联系QQ466356742   EMAIL: 466356742@qq.com
论坛问题请不要随意加我,我每晚会上论坛回答。
返回列表