去评论
dz插件网

使用SEO全能伪静态插件配合dz默认伪静态目录化伪静态规则设置教程宝塔面板伪静态规则写法

admin
2023/02/12 12:30:42
使用SEO全能伪静态插件配合dz默认伪静态目录化伪静态规则设置教程宝塔面板伪静态规则写法及遇到部署规则后访问弹出下载的解决办法:

SEO全能伪静态插件后台设置参考要点(一般保持默认设置勿动,或调整后需要重新设置更新伪静态规则):


全能伪静态插件的默认目录化规则参考:
Nginx:
  1. rewrite ^([^\./]*)/(demo)(.+)$ $1/$2$3 break;
  2. rewrite ^([^\./]*)/bbs$ $1/forum.php break;
  3. rewrite ^([^\./]*)/bbs/g([0-9]+)/$ $1/forum.php?gid=$2 break;
  4. rewrite ^([^\./]*)/bbs/([0-9]+)/$ $1/forum.php?mod=viewthread&tid=$2 break;
  5. rewrite ^([^\./]*)/bbs/([0-9]+)/([0-9]+)/$ $1/forum.php?mod=viewthread&tid=$2&page=$3 break;
  6. rewrite ^([^\./]*)/(nextoldset|nextnewset)-([0-9]+)$ $1/forum.php?mod=redirect&goto=$2&tid=$3 break;
  7. rewrite ^([^\./]*)/tag/$ $1/misc.php?mod=tag break;
  8. rewrite ^([^\./]*)/tag/([0-9]+)/$ $1/misc.php?mod=tag&id=$2 break;
  9. rewrite ^([^\./]*)/tag/([0-9]+)/([0-9]+)/$ $1/misc.php?mod=tag&id=$2&type=thread&page=$3 break;
  10. rewrite ^([^\./]*)/btag/([0-9]+)/([0-9]+)/$ $1/misc.php?mod=tag&id=$2&type=blog&page=$3 break;
  11. rewrite ^([^\./]*)/guide/$ $1/forum.php?mod=guide break;
  12. rewrite ^([^\./]*)/guide/(hot|digest|new|newthread|sofa|my)/$ $1/forum.php?mod=guide&view=$2 break;
  13. rewrite ^([^\./]*)/guide/(hot|digest|new|newthread|sofa|my)/([0-9]+)/$ $1/forum.php?mod=guide&view=$2&page=$3 break;
  14. rewrite ^([^\./]*)/u/([0-9]+)/$ $1/home.php?mod=space&uid=$2&do=profile break;
  15. rewrite ^([^\./]*)/u-([^/]+)$ $1/home.php?mod=space&username=$2 break;
  16. rewrite ^([^\./]*)/blog/([0-9]+)/b([0-9]+)/$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 break;
  17. rewrite ^([^\./]*)/blog/([0-9]+)/$ $1/home.php?mod=space&uid=$2&do=blog&view=me&from=space break;
  18. rewrite ^([^\./]*)/blog/([0-9]+)/([0-9]+)/$ $1/home.php?mod=space&uid=$2&do=blog&view=me&from=space&page=$3 break;
  19. rewrite ^([^\./]*)/plugin/(\w+)/$ $1/plugin.php?id=$2 break;
  20. rewrite ^([^\./]*)/plugin/(\w+)/(\w+)/$ $1/plugin.php?id=$2:$3 break;
  21. rewrite ^([^\./]*)/group/$ $1/group.php break;
  22. rewrite ^([^\./]*)/group/g([0-9]+)/$ $1/group.php?gid=$2 break;
  23. rewrite ^([^\./]*)/group/s([0-9]+)/$ $1/group.php?sgid=$2 break;
  24. rewrite ^([^\./]*)/group/([0-9]+)/$ $1/forum.php?mod=group&fid=$2 break;
  25. rewrite ^([^\./]*)/collection/$ $1/forum.php?mod=collection break;
  26. rewrite ^([^\./]*)/collection/(\d+)/$ $1/forum.php?mod=collection&action=view&ctid=$2 break;
  27. rewrite ^([^\./]*)/portal/$ $1/portal.php break;
  28. rewrite ^([^\./]*)/portal/([0-9]+)/$ $1/portal.php?mod=view&aid=$2 break;
  29. rewrite ^([^\./]*)/portal/([0-9]+)/([0-9]+)/$ $1/portal.php?mod=view&aid=$2&page=$3 break;
  30. rewrite ^([^\./]*)/portal-list/([0-9]+)/$ $1/portal.php?mod=list&catid=$2 break;
  31. rewrite ^([^\./]*)/portal-list/([0-9]+)/([0-9]+)/$ $1/portal.php?mod=list&catid=$2&page=$3 break;
  32. rewrite ^([^\./]*)/topicid/([0-9]+)/$ $1/portal.php?mod=topic&topicid=$2 break;
  33. rewrite ^([^\./]*)/topic/(\w+)/$ $1/portal.php?mod=topic&topic=$2 break;
  34. rewrite ^([^\./]*)/([0-9]+)/$ $1/forum.php?mod=forumdisplay&fid=$2 break;
  35. rewrite ^([^\./]*)/([0-9]+)/([0-9]+)/$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 break;
  36. rewrite ^([^\./]*)/([0-9]+)-([0-9]+)/$ $1/forum.php?mod=forumdisplay&fid=$2&filter=typeid&typeid=$3 break;
  37. rewrite ^([^\./]*)/([0-9]+)-([0-9]+)/([0-9]+)/$ $1/forum.php?mod=forumdisplay&fid=$2&filter=typeid&typeid=$3&page=$4 break;
  38. rewrite ^([^\./]*)/([0-9]+)-s([0-9]+)/$ $1/forum.php?mod=forumdisplay&fid=$2&filter=sortid&sortid=$3 break;
  39. rewrite ^([^\./]*)/([0-9]+)-s([0-9]+)/([0-9]+)/$ $1/forum.php?mod=forumdisplay&fid=$2&filter=sortid&sortid=$3&page=$4 break;
  40. rewrite ^([^\./]*)/([0-9]+)-([0-9]+)-s([0-9]+)/$ $1/forum.php?mod=forumdisplay&fid=$2&filter=typeid&typeid=$3&sortid=$4 break;
  41. rewrite ^([^\./]*)/([0-9]+)-t([0-9]+)-s([0-9]+)/([0-9]+)/$ $1/forum.php?mod=forumdisplay&fid=$2&filter=typeid&typeid=$3&sortid=$4&page=$5 break;
  42. if (!-e $request_filename) {
  43.         return 404;
  44. }

伪静态规则放置路径及设置方法图文参考:
宝塔面板 —— 左侧 —— 网站 —— 点开你域名的那个:


网站前台进行测试效果,如果访问论坛首页或版块ID等遇到如下一访问就弹出下载的问题:



问题分析原因及解决办法:
[此处包含隐藏内容,如果需要查看请回复]