Created
February 18, 2016 19:02
-
-
Save cihangir/429538a057d28eaf27c8 to your computer and use it in GitHub Desktop.
redirect www to non-www
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
# redirect www to non-www | |
server { | |
server_name "~^www.(.*)$" ; | |
return 301 $scheme://$1$request_uri ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment