Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wget: don't follow redirects

How do I prevent wget from following redirects?

like image 300
flybywire Avatar asked Apr 18 '10 16:04

flybywire


People also ask

Does wget follow redirects?

Like regular HTTP clients, wget supports URL redirection (also known as URL forwarding), which means that when you attempt to download a redirected URL, wget will automatically follow URL redirect to fetch the redirected target.

How do I follow curl redirect?

To follow redirect with Curl, use the -L or --location command-line option. This flag tells Curl to resend the request to the new address. When you send a POST request, and the server responds with one of the codes 301, 302, or 303, Curl will make the subsequent request using the GET method.

How does wget work?

Wget is the non-interactive network downloader which is used to download files from the server even when the user has not logged on to the system and it can work in the background without hindering the current process. GNU wget is a free utility for non-interactive download of files from the Web.


1 Answers

--max-redirect 0

I haven't tried this, it will either allow none or allow infinite..

like image 101
Matt Avatar answered Nov 07 '22 12:11

Matt