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 -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -