301 Redirect from www version to non www.

lichandro nginx-forum at forum.nginx.org
Fri Mar 23 19:06:34 UTC 2018


Hello I have to redirect my whole traffic to the non www version of my
website. I have the http2 SSL free form cloudflare. I did this in my .conf
file and It doesn't work. 

server {
    listen 80;
    server_name www.kasacja-aut.pl kasacja-aut.pl
https://www.kasacja-aut.pl;
    return 301 https://kasacja-aut.pl$request_uri;
}

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279183,279183#msg-279183



More information about the nginx mailing list