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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -