全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 603|回复: 1

求助论坛各位大佬,网站不知道为什么用了cdn后一直重定向

[复制链接]
发表于 2022-7-30 19:54:07 | 显示全部楼层 |阅读模式
本帖最后由 赫兹梓籽 于 2022-7-30 19:56 编辑

求助论坛各位大佬,网站不知道为什么用了cdn后一直说重定向过多
这是nginx配置
  1. server
  2. {
  3.         listen 80; #listen end
  4.         server_name xxxx.com; #server_name end
  5.         index index.html index.htm index.php; #index end

  6.         set $subdomain '';
  7.         root  /home/wwwroot/php7/domain/bbs.xxxx.site/web$subdomain;
  8.         return 301 https://$host$request_uri; #force_ssl end
  9.         include /home/wwwroot/php7/rewrite/xiuno.conf; #rewrite end

  10.         #error_page
  11.         error_page 400 /ErrorPages/400.html;
  12.         error_page 403 /ErrorPages/403.html;
  13.         error_page 404 /ErrorPages/404.html;
  14.         error_page 502 /ErrorPages/502.html;
  15.         location ~ /ErrorPages/(400|401|403|404|405|502|503)\.html$
  16.         {
  17.                 root /home/wwwroot/php7/domain/bbs.xxxxxi.site/web;
  18.         }


  19.         location ~ .*\.php$
  20.         {
  21.                 fastcgi_pass  unix:/tmp/php-cgi-php7-bbs.xxxx.site.sock;
  22.                 fastcgi_index index.php;
  23.                 include fcgi.conf;
  24.                 fastcgi_param DOCUMENT_ROOT  /home/wwwroot/php7/domain/bbs.xxxx.site/web$subdomain;
  25.                 fastcgi_param SCRIPT_FILENAME  /home/wwwroot/php7/domain/bbs.xxxx.site/web$subdomain$fastcgi_script_name;
  26.         }

  27.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp3|wma)$
  28.         {
  29.                 expires      30d;
  30.         }

  31.         location ~ .*\.(js|css)$
  32.         {
  33.                 expires      12h;
  34.         }
  35.        
  36.         location ~* \.(htm)$ {

  37.     rewrite "^(.*)/(.+?).htm(.*?)$" $1/index.php?$2.htm$3 last;

  38.     }

  39.         access_log off; #access_log end
  40.         error_log /dev/null; #error_log end
  41. }
复制代码


这是伪静态配置:
  1. location ~* \.(htm)$ {

  2.     rewrite "^(.*)/(.+?).htm(.*?)$" $1/index.php?$2.htm$3 last;

  3. }
复制代码


谢谢各位大佬了
发表于 2022-7-30 20:11:54 | 显示全部楼层
把强制https关了试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-18 12:41 , Processed in 0.058421 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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