Getting the final URL after redirects
When you need to get the final URL after all redirects, you can type:
curl -Ls -o /dev/null -w %{url_effective} http://google.com
When you need to get the final URL after all redirects, you can type:
curl -Ls -o /dev/null -w %{url_effective} http://google.com