Ravinder-Sharma 1. My website is currently working like this. http://example.com > https://example.com > https://www.example.com 2. I want my website to work like this. http://example.com > https://www.example.com My server hosts 6 websites. Only 2 of them have to redirect to https://www I tried many codes but it did not work.
portofacil Edit /etc/nginx/conf.d/force-ssl-example.com and replace $host with www.example.com. Reload Nginx and profit.
Ravinder-Sharma portofacil This has been the right thing to do. Now my website is getting redirected in the right way.