Is possible ignore a 301 Moved Permanently redirect and get contents of original webpage. Example: I have a domain1.xxx/post1/ and this redirect to domain2.xxx/home/ (but i'm sure that post1 is still prensent in first url) is possible get content of post1 from the domain1.xxx?
<?php
$url = 'domain1.xxx/post1/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_HEADER,1);
curl_setopt($ch, CURLOPT_NOBODY,0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //important
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);//important
$r = curl_exec($ch);
curl_close($ch);
echo $r;
?>`
But so return me :
"Moved Permanently
The document has moved here."
is a test is not hacking i have a authorization of owner of the site to test this. The site is done with wordpress.
Thnak you