[dev] SERVER_NAME:SERVER_PORT and UseCanonicalName in Apache conflict

Chuck Hagenbuch chuck@horde.org
Thu, 15 Nov 2001 01:24:12 -0500


Quoting Barry Flanagan <barryf-lists@online.ie>:

> Well, is it not the case that all you really need to do is generate the 
> relative URL, the client will figure out the URL from the host and protocol
> that the link originated from. For example:

Nope. Try using lynx sometime; it'll complain voraciously about any site that 
does this.

Also, relying on HTTP_HOST is... unreliable. It's user data. There's no way to 
validate it.


> I just can't see why Horde/PHP needs to get involved at this level at all. 
> Where is it that you would require to send an ABSOLUTE Location: header - the
> only time AFAIK that an absolute Location: is needed is if you explicitly 
> need to change the host or port that you want to redirect to.

Read the RFCs.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin