Re: Help: header function
| From: | Bob Lockie | Date: | Fri, 26 Jul 2002 16:35:10 +0000 |
| Subject: | Re: Help: header function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-109786@lists.php.net to get a copy of this message | ||
>>From: "Tech Support" <jgrill@web-1hosting.net>
>> To: "k a m e s h" <kameshn@csa.iisc.ernet.in>;
>> <php-general@lists.php.net>
>>Sent: Friday, July 26, 2002 11:20 AM
>>Subject: Re: [PHP] Help: header function
>
>
>> Try just header("Location: $PHP_SELF"); or header("Location:
>$SCRIPT_NAME")
>> ...leave out http:// ...and your quotes are in the wrong
>> place too.
>
>I know that works but the spec for http/1.1 says it's supposed to have the
>absoluteURI including the scheme, and host,
>see http://www.php-faq.com/httpheaders.php#14.30. Kamesh's
>trouble was he
>was refering to something like http://mypage.php -- which was
>missing the
>host name. I've coded lots of headers() with relative URIs [i.e.
>header('Location: mypage.php')] without trouble (at least that I know of).
>Has anyone run into trouble using only the page name? Is this something to
>worry about or not?
I think only fully qualified domain names and paths are in the HTTP spec but most/all browsers
support relative names in Location (not that they have to).