In article <>,
Hywel Jenkins <> wrote:
> > > In PHP, just put this in the document index in /
> > > <?
> > > header("location:folder/");
> > > ?>
> >
> > I was recently scorned by some knowledgable people for using this
> > method. They claimed that the Location header requires a full URI, not a
> > relative one, according to some RFC of which I have forgotten the number.
> This is from the PHP docs, so you're right:
>
> <quote>
> Note: HTTP/1.1 requires an absolute URI as argument to Location:
> including the scheme, hostname and absolute path, but some clients
> accept relative URIs. You can usually use $_SERVER['HTTP_HOST'],
> $_SERVER['PHP_SELF'] and dirname() to make an absolute URI from a
> relative one yourself:
[skip PHP code for constructing absolute URI from a relative one]
I heard there is another header that allows relative URI's for
redirection. Looking up the URI for RFC2616 that Dorward gave [1], it
seems to be Content-Location.
[1]
http://www.w3.org/Protocols/rfc2616/....html#sec14.30
(The NOTE at 14.30 mentions Content-Location)
Are there any known drawbacks for using Content-Location and a relative
URI instead of Location and an absolute URI? I would prefer to start
using Content-Location rather than retrofitting the effective, yet
bothersome PHP script that was given (let alone manually entering
absolute URI's).
--
Kris
<> (nl)
<http://www.cinnamon.nl/>