HTTP redirects, Location: header, and IE5 problems
| From: | Greg Billock | Date: | Fri, 22 Sep 2000 19:13:41 +0000 |
| Subject: | HTTP redirects, Location: header, and IE5 problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17315@lists.php.net to get a copy of this message | ||
I have been frustrated recently working with IE5.01+ and
HTTP redirects. In PHP, these are most easily done with
the header("Location: $url"); call, which magically updates
the HTTP return code and everything. :-)
So the problem is that Internet Explorer v. 5 and above
are just returning Error - Page Not Found when given data
like this. What is going on?
At present, it looks to me like the problem is that IE5.01
and IE5.5 are set to default not to honor the HTTP/1.0 spec,
and take absolute URLs in the Location header. Instead,
they display an error. If they are given a *relative* URL,
then they are OK.
Can anyone confirm this as a general observation, or even
more specifically? Can IE5 be set not to ignore the specification
for HTTP headers? I have observed this broken behavior with
IE5.5 on two other sites besides those of mine which try to
do redirects. One looks like it uses Python to issue redirects
and the other uses Perl, so I think this is an issue with Explorer.
As a workaround, Netscape seems to accept relative
paths in the Location header, so that is the indicated
thing. (I guess if you want to do off-site redirects, you
have to find some other mechanism. Perhaps the
HTTP/1.1 Content-location header? I'm not sure...)
-Greg Billock