How to redirect typed in url https://www.example.com to example.com with NGINX -


whenever url typed in https://www.example.com, way redirect example.com @ nginx?

currently, have nginx block redirects example.com

server {          listen 80;    server_name example.com;    return 301 https://$host$request_uri; } 

but no good, if url typed in https://www.example.com


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -