Skip to content

Instantly share code, notes, and snippets.

@gnurag
Created May 14, 2014 17:44
Show Gist options
  • Save gnurag/712ae7c8ce5344443c52 to your computer and use it in GitHub Desktop.
Save gnurag/712ae7c8ce5344443c52 to your computer and use it in GitHub Desktop.
redirect www to naked domain in nginx
server {
listen 80;
server_name www.xinh.org;
rewrite ^ $scheme://xinh.org$request_uri? permanent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment