Created
December 16, 2009 03:34
-
-
Save ELLIOTTCABLE/257564 to your computer and use it in GitHub Desktop.
NginX no‐www
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
| # Unfortunately, this is the ‘officially best and most efficient’ way to | |
| # achieve no‐www under NginX. And yes, this had to be duplicated for each | |
| # domain / virtual‐host. | |
| server { | |
| listen 80; server_name www.domain.tld; | |
| access_log off; | |
| rewrite ^ http://domain.tld$request_uri permanent; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment