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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -