The rcode
CLI lets you see the raw response code and, if applicable, the
redirect chain of a URL. It ends if the response code is 200 OK
.
Assuming you have a working Go environment and GOPATH/bin
is in your
PATH
, install rcode
with
$ go get github.com/mxlje/rcode
Alternatively you can grab the latest compiled version from the
releases section on GitHub and put it in your PATH
by hand.
$ rcode http://miele.de
[301] http://miele.de
[200] http://www.miele.de/haushalt/index.htm
httpbin.org is a great service to test redirect chains:
$ rcode httpbin.org/redirect/2
[302] http://httpbin.org/redirect/2
[302] http://httpbin.org/redirect/1
[200] http://httpbin.org/get
Useful for further analysis.
$ rcode httpbin.org/redirect/1 --csv
302,http://httpbin.org/redirect/1
200,http://httpbin.org/get
See the LICENSE
file for license info (it’s the MIT license).