PHP Developers Network

ERROR: HTTP/1.1 301 Moved Permanently Location
Page 1 of 1

Author:  UniqueIdeaMan [ Wed May 24, 2017 5:45 pm ]
Post subject:  ERROR: HTTP/1.1 301 Moved Permanently Location

Hard Men, :D

Check this weird thing out!
Fire-up your Wamp/Xampp and try this code:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "");
curl_setopt($ch, CURLOPT_HEADER, 5);
$result = curl_exec($ch);
$result = preg_replace("#(<\s*a\s+[^>]*href\s*=\s*[\"'])(?!http)([^\"'>]+)([\"'>]+)#",'$1$2$3', $result);
echo $result

Now, instead of loading you will see an error mssg like so:

HTTP/1.1 301 Moved Permanently Location:

What does that mean ? On my Chrome, I don't see showing any likewise mssg. Nor, am I getting redirected to any other page.

I found the code here: ... urled-html

It is supposed to replace all relative links to absolute links.


Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group