Created
April 26, 2013 09:18
-
-
Save matteocrippa/5465999 to your computer and use it in GitHub Desktop.
Nginx - Redirect a domain with 301 to another domain
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
| server { | |
| # set the domain name this rule will work for | |
| server_name tld.domain.ext; | |
| # i force to listen to port 80 | |
| listen 80; | |
| # no root, directly the redirect | |
| rewrite ^ http://www.newdomain.com$request_uri? permanent; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment