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

100次阅读

共计 1420 个字符,预计需要花费 4 分钟才能阅读完成。

求助论坛各位大佬,网站不知道为什么用了 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. }

复制代码

谢谢各位大佬了

网友回复:

注册 把强制 https 关了试试

正文完
 0