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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -