Last active
September 13, 2016 10:24
-
-
Save kphrx/b96c90d382a6bc0dfda6df30a09dd46a to your computer and use it in GitHub Desktop.
This file contains 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
## www to non-www redirect ## | |
server { | |
## all www sub-domain ## | |
server_name ~^www\.(.*\.example.com)$; | |
## redirect to non-www sub-domain ## | |
return 301 $scheme://$1$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment