Nginx 设置 301 跳转和 302 跳转的方法

其他教程 技术教程评论366字数 74阅读0分14秒阅读模式

1709542296 Nginx

Nginx 301 跳转(永久重定向)关键词:permanent,在伪静态规则后面加上空格和该关键词即可。文章源自国外主机测评-https://www.zjcp.org/33868.html

rewrite ^/(.*)$ https://www.zjcp.org permanent;

Nginx 302 跳转(临时重定向)关键词:redirect,在伪静态规则后面加上空格和该关键词即可。文章源自国外主机测评-https://www.zjcp.org/33868.html

rewrite ^/(.*)$ https://www.zjcp.org redirect;
文章源自国外主机测评-https://www.zjcp.org/33868.html文章源自国外主机测评-https://www.zjcp.org/33868.html
 
  • 本文由 主机测评 发表于2024年3月4日 16:52:00
  • 转载请务必保留本文链接:https://www.zjcp.org/33868.html

发表评论