去评论
随县网_随县论坛_随州随县论坛网

随县论坛Linux服务器伪静态和301跳转重定向写法.htaccess

┽→踏雪无痕╰
2013/08/16 09:21:46
  1. <IfModule mod_rewrite.c>
  2. # 将 RewriteEngine 模式打开
  3. RewriteEngine On

  4. ErrorDocument 404 /404/index.html

  5. RewriteCond %{HTTP_HOST} ^sxbbs.cn$ [NC]
  6. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

  7. RewriteCond %{HTTP_HOST} ^www.suiw.net$ [NC]
  8. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

  9. RewriteCond %{HTTP_HOST} ^www.0722pp.com$ [NC]
  10. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

  11. RewriteCond %{HTTP_HOST} ^www.szggmm.com$ [NC]
  12. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

  13. RewriteCond %{HTTP_HOST} ^www.shuizhidu.cn$ [NC]
  14. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

  15. RewriteCond %{HTTP_HOST} ^suiw.net$ [NC]
  16. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

  17. RewriteCond %{HTTP_HOST} ^0722pp.com$ [NC]
  18. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

  19. RewriteCond %{HTTP_HOST} ^szggmm.com$ [NC]
  20. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

  21. RewriteCond %{HTTP_HOST} ^shuizhidu.cn$ [NC]
  22. RewriteRule ^(.*)$ https://www.sxbbs.cn/$1 [R=301,L]

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

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