How does link redirecting work?

229 views

Like I understand hyperlinks, but how do you redirect a link to another link?? Can you be redirected twice?

In: 4

3 Answers

Anonymous 0 Comments

When you request the page, the server sends back a response packet with a redirect status code. The packet contains the new URI for the resource the client requested. The client can send a request to that URI to access the resource. It’s essentially like getting a letter returned with the message “That guy doesn’t live here anymore. Here’s the address he said he was moving to. Good luck.” scribbled on it.

It’s possible that the server for the redirected URI will also respond with a redirect, if the requested resource has moved again. In that case, the client can just keep following redirects until they either find the resource, get an error response, or just give up because it’s taking too long.

You are viewing 1 out of 3 answers, click here to view all answers.