Skip to content

Instantly share code, notes, and snippets.

@tgraham
Created November 22, 2010 23:13
Show Gist options
  • Save tgraham/710907 to your computer and use it in GitHub Desktop.
Save tgraham/710907 to your computer and use it in GitHub Desktop.
Nginx redirect
Put this in your server{} block in your nginx config file:
if ($host = 'tricklesofchange.com' ) {
rewrite ^/(.*)$ http://www.tricklesofchange.com/$1 permanent;
}
This will force a 301 redirect on all requests coming in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment