code to nginx wordpress redirect www to non-www https code example
Example: nginx redirect www to non-www
server {
server_name www.example.com;
return 301 $scheme://example.com$request_uri;
}
server {
server_name www.example.com;
return 301 $scheme://example.com$request_uri;
}