nginx站点跳转

从dirlt.com跳转到dirtysalt.info

http {
    server_name dirlt.com;
    rewrite ^ $scheme://dirtysalt.info$request_uri? permanent;
}

这样访问dirlt.com时候,返回HTTP Permanent Redirect

➜~  curl -v -S dirlt.com
-* Rebuilt URL to: dirlt.com/
-*   Trying 139.162.32.139...
-* Connected to dirlt.com (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: dirlt.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: nginx/1.4.6 (Ubuntu)
< Date: Sat, 26 Mar 2016 02:25:22 GMT
< Content-Type: text/html
< Content-Length: 193
< Connection: keep-alive
< Location: http://dirtysalt.info/
<
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>