|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-11-08 12:59 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Jun 18 13:00:01 2026 UTC |
Would it be possible that when issuing header("Location: ...") the protocol and host name would automagically be prepended, if it was missing. Since it's handled specially anyway, it perhaps wouldn't be such a problem? So header("Location: /index.html") would be the same as global $HTTP_HOST, $HTTPS; if ($HTTPS=="on") header("Location: https://$HTTP_HOST/index.html"); else header("Location: http://$HTTP_HOST/index.html"); (in apache anyway) It would mean less typing for the programmer, forced compliance with HTTP/1.1 and it would work for both http:// and https:// which now have to be handled separately.