How to make curl follow redirect properly? Need help with curl follow redirect behavior. Alternatively, for

18 Replies, 1090 Views

Hey! Had the same issue last week. Turns out some sites block curl follow redirect with user-agent checks. Try adding `-A "Mozilla/5.0"` to your command.

Also, `-v` helps debug—shows headers so you can see if the redirect is even being sent.

If that fails, maybe the server’s doing weird stuff. Try `curl -v -L --post301 --post302 http://example.com` to force it.

Messages In This Thread



Users browsing this thread: 1 Guest(s)