configuration - Redirect https www to http non-www nginx -


i'm trying redirect https http, , www non www. unfortunately it's not working.

examples of need do:

  1. https://www.example.com -> http://example.com/
  2. http://www.example.com -> http://example.com/

here i've done far is:

# redirect https http: # server {     listen 443;     server_name www.example.com expample.com;     return 301 http://example.com$request_uri; } # redirect www non-www. # server {     #listen 80 default     server_name www.example.com;     return 301 $scheme://example.com$request_uri; }  # actual server configuration goes here: # server {     listen       80;     server_name  example.com;  #rest of block configuration 

thanks ahead!


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -