note 33495 added to function.header
| From: | tlang at halsoft dot com | Date: | Fri, 27 Jun 2003 15:14:13 +0000 |
| Subject: | note 33495 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51106@lists.php.net to get a copy of this message | ||
Using PHP Version 4.3.2, Apache/1.3.24, Solaris/SPARC (Unix)
I want to redirect some pages to make sure they use https. I had trouble getting this to work:
header("Location: https://" . $_SERVER['HTTP_HOST']
. $_SERVER['REQUEST_URI']);
Browser (MSIE 6) was just getting an empty document. I added CR/LF, and that fixed it.
header("Location: https://" . $_SERVER['HTTP_HOST']
. $_SERVER['REQUEST_URI'] . "\r\n");
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33495
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33495&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33495&report=yes