Strange HTTP header issue: 301 redirect to the same page?
Posted: Sat Nov 27, 2010 12:37 pm
I'm experiencing some confusion regarding the headers returned from a certain URL. The URL in question is:
http://www.mysmartphoneinfo.com/verizon ... rld/399884
The problem is that when I access it (not from a browser, but directly through programming code) the headers returned are:
HTTP/1.1 301 Moved Permanently
Date: Sat, 27 Nov 2010 18:22:52 GMT
Server: Apache
X-Powered-By: PHP/5.2.14
X-Pingback: http://www.mysmartphoneinfo.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Last-Modified: Sat, 27 Nov 2010 18:22:52 GMT
Location: http://http/www.mysmartphoneinfo.com/ve ... rld/399884
Vary: Accept-Encoding
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
As you can see, it appears to be issuing a 301 redirect ... to the same page I just requested. Additionally, the formatting of the URL in the location header doesn't seem quite right: "http:/http/www ..." Am I missing something here - what could the reason be for this behaviour? If you follow the link in a browser you seem to arrive at the right page (original URL) without issue.
One theory I have is that, by accessing it programmatically, no browser/agent data is being sent and the website is thus treating the request differently. I'm not, incidentally, doing this with PHP, which is why I have not posted any code.
http://www.mysmartphoneinfo.com/verizon ... rld/399884
The problem is that when I access it (not from a browser, but directly through programming code) the headers returned are:
HTTP/1.1 301 Moved Permanently
Date: Sat, 27 Nov 2010 18:22:52 GMT
Server: Apache
X-Powered-By: PHP/5.2.14
X-Pingback: http://www.mysmartphoneinfo.com/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Last-Modified: Sat, 27 Nov 2010 18:22:52 GMT
Location: http://http/www.mysmartphoneinfo.com/ve ... rld/399884
Vary: Accept-Encoding
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
As you can see, it appears to be issuing a 301 redirect ... to the same page I just requested. Additionally, the formatting of the URL in the location header doesn't seem quite right: "http:/http/www ..." Am I missing something here - what could the reason be for this behaviour? If you follow the link in a browser you seem to arrive at the right page (original URL) without issue.
One theory I have is that, by accessing it programmatically, no browser/agent data is being sent and the website is thus treating the request differently. I'm not, incidentally, doing this with PHP, which is why I have not posted any code.