Re: How to get the Web Address of the Script
| From: | NukedWeb at aol dot com | Date: | Sun, 21 Sep 2003 05:41:43 +0000 |
| Subject: | Re: How to get the Web Address of the Script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-163332@lists.php.net to get a copy of this message | ||
In a message dated 9/21/2003 1:35:43 AM Eastern Standard Time,
php-general@zirzow.dyndns.org writes:
> The host: header is what HTTP_HOST is. If you can access the site
> by the IP, I'm not exactly sure what will happen in that case,
> cause the browser may not send that host: value.
>
If it's accessed by IP, the "Host: header is omitted, and $HTTP_HOST returns
the IP address. To build the full URL to that particular script, you would
have to piece it together, using protocol + "://" + $http_host + "/" +
$REQUEST_URI etc etc, not sure the exact code, but thats what ya gotta do...