2012-06-16 14:44:26
Web development
, 2012-06-16 14:44:26

301 Moved Permanently. How to process?

I am new to the web. With a simple GET I take the page.
Returns "301 Moved Permanently"
How to process? Where can I get the page that was redirected to? How to process this redirect in general?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
N
NiGHt_LEshiY, 2012-06-16
midday

Example when requesting " google.ru ":
HTTP/1.1 301 Moved Permanently
Location: www.google.ru/

H
Hungry_Hunter, 2012-06-16
@Hungry_Hunter

Fetch the page with curl, use
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

S
ShadowHacker, 2012-06-16
@ShadowHacker

If you use curl, it transparently goes through redirects.

S
ShadowHacker, 2012-06-16
@ShadowHacker

If you use curl, it transparently goes through redirects.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question