[b]"How to make curl follow redirect properly? Need help with curl follow redirect behavior."[/b] Alternatively, for

18 Replies, 866 Views

Title: Why isn't curl follow redirect working as expected?

Hey folks,

I'm having trouble with curl follow redirect. I thought `-L` would handle it automatically, but it’s not following the redirects like it should.

Here’s what I’m running:
```bash
curl -L https://example.com/somepage
```
But it just stops at the first response. Am I missing something?

Tried adding `--max-redirs 10` too, no luck.

Any ideas why curl follow redirect isn’t behaving? Or how to debug this properly?

Thanks!

---

*Alternatively, shorter version:*

Title: How to make curl follow redirect properly?

Yo,

`curl -L` should follow redirects, right? But mine’s not. What gives?

Example:
```bash
curl -L http://some.site/old-url
```
Just hangs or stops early.

Is there a trick to make curl follow redirect *every* time? Help a noob out!

Cheers.

Messages In This Thread
[b]"How to make curl follow redirect properly? Need help with curl follow redirect behavior."[/b] Alternatively, for - by - 09-01-2025, 01:44 PM



Users browsing this thread: 1 Guest(s)