curl / Mailing Lists / curl-users / Single Mail


I need to get the redirect url without downloading the url

From: ToddAndMargo <>
Date: Sun, 5 Aug 2018 13:51:31 -0700

Hi All,

There are times when I need the redirect url(s)

     curl -Ls -w %{url_effective} -o /dev/null

does give the redirect, but it downloads the file as well
(sends it to dev nul). This is not practical when the
downloaded file is multiple megabytes long.

Is there a way to get curl to give me just the redirect(s)?

Many thanks,

Received on 2018-08-05