User Tools

Site Tools


curl:track_web_redirects

Curl - Track Web Redirects

Sometimes a page may redirect to another resource.

By default CURL will not follow page redirections. To make CURL follow redirections use the -L option.

curl -v -Ls  -o /dev/null sharewiz.net
  • -L Follow redirects
  • -s Silent mode. Don't show progress meter or error messages.
  • -o FILE Write output to <file> instead of stdout
  • -v Verbose

returns:

* Rebuilt URL to: sharewiz.net/
*   Trying 192.168.1.2...
* Connected to sharewiz.net (192.168.1.2) port 80 (#0)
> GET / HTTP/1.1
> Host: sharewiz.net
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: nginx
< Date: Fri, 01 Jul 2016 23:27:56 GMT
< Content-Type: text/html
< Content-Length: 28277
< Last-Modified: Thu, 30 Jun 2016 23:16:03 GMT
< Connection: keep-alive
< ETag: "5775a833-6e75"
< Accept-Ranges: bytes
< 
{ [16150 bytes data]
* Connection #0 to host sharewiz.net left intact
curl/track_web_redirects.txt · Last modified: 2020/09/25 13:11 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki