百度 baidu.com使用的跳转技术
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
curl baidu.com -v
可见效果
[root@iZ2365vnxnsZ ~]# curl baidu.com -v
* About to connect() to baidu.com port 80 (#0)
* Trying 180.149.132.47... connected
* Connected to baidu.com (180.149.132.47) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Ba sic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: baidu.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 09 Oct 2015 01:29:22 GMT
< Server: Apache
< Cache-Control: max-age=86400
< Expires: Sat, 10 Oct 2015 01:29:22 GMT
< Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT
< ETag: "51-4b4c7d90"
< Accept-Ranges: bytes
< Content-Length: 81
< Connection: Keep-Alive
< Content-Type: text/html
<
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
* Connection #0 to host baidu.com left intact
* Closing connection #0
网易163.com的跳转
[root@iZ2365vnxnsZ ~]# curl 163.com -v
* About to connect() to 163.com port 80 (#0)
* Trying 123.58.180.8... connected
* Connected to 163.com (123.58.180.8) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 163.com
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: nginx
< Date: Fri, 09 Oct 2015 01:33:25 GMT
< Content-Type: text/html
< Content-Length: 178
< Connection: keep-alive
< Location: http://www.163.com/
<
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host 163.com left intact
* Closing connection #0
扫描二维码推送至手机访问。
版权声明:本文由学无止境-开拓创新-ipvb学习网发布,如需转载请注明出处。