vps交流

宝塔discuz设置伪静态,这样设置有问题吗?


  1. location / {
  2.         rewrite ^([^.]*)/portal.html$ $1/portal.php last;
  3. rewrite ^([^.]*)/list/([0-9]+)/([0-9]+).html$ $1/portal.php?mod=list&catid=$2&page=$3 last;
  4. rewrite ^([^.]*)/guide/(w+)/([0-9]+).html$ $1/forum.php?mod=guide&view=$2&page=$3 last;
  5. rewrite ^([^.]*)/forum.html$ $1/forum.php last;
  6. rewrite ^([^.]*)/f/([0-9]+).html$ $1/forum.php?gid=$2 last;
  7. rewrite ^([^.]*)/f/(w+)/1.html$ $1/forum.php?mod=forumdisplay&fid=$2 last;
  8. rewrite ^([^.]*)/t/([0-9]+)/1/1.html$ $1/forum.php?mod=viewthread&tid=$2 last;
  9. rewrite ^([^.]*)/f/(w+)/t([0-9]+)/([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=$2&filter=typeid&typeid=$3&page=$4 last;
  10. rewrite ^([^.]*)/f/(w+)/s([0-9]+)/([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=$2&filter=sortid&sortid=$3&page=$4 last;
  11. rewrite ^([^.]*)/f/(w+)/t([0-9]+)/s([0-9]+)/([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=$2&filter=typeid&typeid=$3&sortid=$4&page=$5 last;
  12. rewrite ^([^.]*)/f/(w+)/s([0-9]+)/([w.|]+)/([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=$2&filter=sortid&sortid=$3&searchsort=1&rewritevars=$4&page=$5 last;
  13. rewrite ^([^.]*)/f/(w+)/t([0-9]+)/s([0-9]+)/([w.|]+)/([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=$2&filter=sortid&typeid=$3&sortid=$4&searchsort=1&rewritevars=$5&page=$6 last;
  14. rewrite ^([^.]*)/tag.html$ $1/misc.php?mod=tag last;
  15. rewrite ^([^.]*)/tag/([0-9]+).html$ $1/misc.php?mod=tag&id=$2 last;
  16. rewrite ^([^.]*)/tag-name-(.+).html$ $1/misc.php?mod=tag&name=$2 last;
  17. rewrite ^([^.]*)/tag/([0-9]+)/(w+)/([0-9]+).html$ $1/misc.php?mod=tag&id=$2&type=$3&page=$4 last;
  18. rewrite ^([^.]*)/thread/([0-9]+)/author/([0-9]+)/([0-9]+).html$ $1/forum.php?mod=viewthread&tid=$2&authorid=$3&page=$4 last;
  19. rewrite ^([^.]*)/thread/([0-9]+)/album.html$ $1/forum.php?mod=viewthread&tid=$2&from=album last;
  20. rewrite ^([^.]*)/album/([0-9]+)/([0-9]+).html$ $1/home.php?mod=space&uid=$2&do=album&id=$3 last;
  21. rewrite ^([^.]*)/group/(gid|sgid)/([0-9]+).html$ $1/group.php?$2=$3 last;
  22. rewrite ^([^.]*)/collection.html$ $1/forum.php?mod=collection last;
  23. rewrite ^([^.]*)/collection/([0-9]+)/([0-9]+).html$ $1/forum.php?mod=collection&action=view&ctid=$2&page=$3 last;
  24. rewrite ^([^.]*)/topic-(.+).html$ $1/portal.php?mod=topic&topic=$2 last;
  25. rewrite ^([^.]*)/article/([0-9]+)/([0-9]+).html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
  26. rewrite ^([^.]*)/f/(w+)/([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
  27. rewrite ^([^.]*)/t/([0-9]+)/([0-9]+)/([0-9]+).html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
  28. rewrite ^([^.]*)/group/([0-9]+)/([0-9]+).html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
  29. rewrite ^([^.]*)/space/(username|uid)/(.+).html$ $1/home.php?mod=space&$2=$3 last;
  30. rewrite ^([^.]*)/blog/([0-9]+)/([0-9]+).html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
  31. rewrite ^([^.]*)/archiver/(fid|tid)/([0-9]+).html$ $1/archiver/index.php?action=$2&value=$3 last;
  32. rewrite ^([^.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_-]+).html$ $1/plugin.php?id=$2:$3 last;
  33. rewrite ^([^.]*)/topic-(.+).html$ $1/portal.php?mod=topic&topic=$2 last;
  34.         rewrite ^([^.]*)/article-([0-9]+)-([0-9]+).html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
  35.         rewrite ^([^.]*)/forum-(w+)-([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
  36.         rewrite ^([^.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
  37.         rewrite ^([^.]*)/group-([0-9]+)-([0-9]+).html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
  38.         rewrite ^([^.]*)/space-(username|uid)-(.+).html$ $1/home.php?mod=space&$2=$3 last;
  39.         rewrite ^([^.]*)/blog-([0-9]+)-([0-9]+).html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
  40.         rewrite ^([^.]*)/(fid|tid)-([0-9]+).html$ $1/index.php?action=$2&value=$3 last;
  41.         rewrite ^([^.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_-]+).html$ $1/plugin.php?id=$2:$3 last;
  42.         if (!-e $request_filename) {
  43.                         return 404;
  44.         }
  45. }

复制代码

现在手机版伪静态不稳定,然后管理员账号无法访问用户个人中心

宝塔自带discuz伪静态。。直接选

主菜单 发表于 2022-3-22 16:42
宝塔自带discuz伪静态。。直接选

这个是宝塔自带的 加的插件设置的