Last active
July 17, 2018 22:42
-
-
Save evemilano/e3fabbdadee6632774abbe5157d3bf23 to your computer and use it in GitHub Desktop.
Nginx www and not www 301 redirect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#blocco di redirect | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name evemilano.com; | |
rewrite ^(.*) http://www.evemilano.com$1 permanent; | |
} | |
#blocco default | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.evemilano.com; | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Guida completa: https://www.evemilano.com/redirect-www-not-www/