#redirect
4 one-liners with this tag.
All one-liners tagged redirect
Follow and show the redirect chain of a URL
$curl -sSIL http://example.com/ | grep -iE '^(HTTP/|location:)'
Show the number of redirects and the final URL
$curl -sL -o /dev/null -w 'Weiterleitungen: %{num_redirects}\nZiel: %{url_effective}\nStatus: %{http_code}\n' https://example.com/
Show the redirect chain of a URL with status codes
$curl -sIL "http://example.com/" | grep -iE "^(HTTP/|location:)"
Test http, https, www and non-www at once
$for u in http://example.com/ http://www.example.com/ https://example.com/ https://www.example.com/; do curl -s -o /dev/null -m 10 -w "%{http_code} $u -> %{redirect_url}\n" "$u"; done