HTTP_HOST instead of SERVER_NAME for redirection

From: Date: Tue, 07 Jan 2003 20:41:50 +0000
Subject: HTTP_HOST instead of SERVER_NAME for redirection
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-14823@lists.php.net to get a copy of this message
Hi! I am thinking about using HTTP_HOST instead of SERVER_NAME for redirection in the error script. It does not make any difference for mirrors returning the right mirror URL in the SERVER_NAME var, but for those mirrors with setups like at lt2.php.net, if use any feature involving redirection to some address including SERVER_NAME, the server is changed to be the one set up in httpd.conf (and therefore the user moves out of the php.net namespace, which is not too good if we want to introduce any settings in the future, and also not too good for manual note maintainers, as their login status gets lost). Now, before I make any change I would like to ask you, what do you think? Would there be any problems with using HTTP_HOST (the hostname used in the request) instead of SERVER_NAME (the name provided by the server). Note, that both are used in the $MYSITE detection process to ensure, that the right mirror site data is selected locally. Goba

« previous php.mirrors (#14823) next »