查看: 1340|回复: 1
收起左侧

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

[复制链接]
发表于 2013-8-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>
复制代码
发表于 2013-11-25 08:09:08 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

快速入职
隐私保护
薪资透明
信息可靠
手机找工作

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