Nginx配置301重定向

Nginx配置301重定向

版权申明:本文为原创文章,转载请注明原文出处

原文链接:https://blog.it-follower.com/posts/2162506918.html

1
2
3
4
5
6
7
8
9
10
11
12
13
server {
listen 443 ssl;
server_name www.it-follower.com it-follower.com;
ssl_certificate cert/www.it-follower.com.pem;
ssl_certificate_key cert/www.it-follower.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

rewrite ^(.*) https://blog.it-follower.com$1 permanent;
}

这是我的配置,将it-follower.comwww.it-follower.com和 全部重定向到了blog.it-follower.com

评论