军哥帮我看看301跳转这么写有木有问题啊?
写的301跳转从http跳转到https的写法server{
listen 80;
server_name abc.com;
return 301 https://www.abc.com$request_uri;
}
server{
listen 80;
server_name www.abc.com;
return 301 https://www.abc.com$request_uri;
}
第二种写法:
server{
listen 80;
server_name abc.com;
server_name www.abc.com;
return 301 https://www.abc.com$request_uri;
}
那种效率最高哇? 测试都正常.
还是第三种写法:
server{
listen 80;
server_name abc.comwww.abc.com;
return 301 https://www.abc.com$request_uri;
} 应该是没差别
页:
[1]