wget: don't follow redirects

后端 未结 5 2249
春和景丽
春和景丽 2020-12-14 05:33

How do I prevent wget from following redirects?

5条回答
  •  醉梦人生
    2020-12-14 06:08

    Use curl without -L instead of wget. Omitting that option when using curl prevents the redirect from being followed.

    If you use curl -I then you'll get the headers instead of the redirect HTML.

    If you use curl -IL then you'll get the headers for the URL, plus those for the URL you're redirected to.

提交回复
热议问题