Redirect non-www to www on nginx server -


i want redirect https://example.com https://www.example.com. read multiple questions here , articles how doesn't seem work. here tried:

server{     listen 80;     listen 443 ssl;     server_name example.com;     return 301 $scheme://www.example.com$request_uri; } 

i set record name www points ip.

i use cloudflare if important know ...

any ideas i'm doing wrong?


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -