Re: Re: header
| From: | Nathan Rixham | Date: | Tue, 16 Sep 2008 17:13:54 +0000 |
| Subject: | Re: Re: header | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-280294@lists.php.net to get a copy of this message | ||
Robert Cummings wrote:
On Tue, 2008-09-16 at 17:49 +0100, Nathan Rixham wrote:indeed; I also meant "consider" && "simply"; I also meant: define('PUBLIC_BASE_HREF' , 'http://php.net/') <head> <base href="<?php echo PUBLIC_BASE_HREF; ?>" /> </head> and further thinking there has to be an easier / cleaner way of getting "http://" / "https://" in php.. ps: please excuse the typo's etc.tedd wrote:I think you mean "fool proof" when you say "full proof". It's synonymous with "idiot proof". Cheers, Rob.At 3:16 PM +0100 9/16/08, Nathan Rixham wrote:thanks tedd, to be full proof though there's a lot lacking; for example http/1.0 browsers don't pass through HTTP_HOST seeing as it's only in http/1.1; also even on http/1.1 it's sometimes spoofed; further there's the whole HTTPS_HOST to concider; there's only one full proof method and thats to simple hard code or define it:Alain R. wrote:I don't see anything wrong with it. It looks nice, elegant and proper to me. Cheers, teddHi, how in PHP can i create the similar header as following ? <head> <base href="www.mywebsite.com"> </head> thx. A.just incase everybody else went down a complete tangent on this one <head> <base href="<?php echo $_SERVER['HTTP_HOST']; ?>"> </head> it's not nice, elegant, the *proper* way to do things but it'll do the job if I understand you correctly