[wp-hackers] Why WP_SITEURL and not $_SERVER['HTTP_HOST']?
wordpress at zed1.com
Tue Mar 30 09:11:37 UTC 2010
On 30 March 2010 09:03, Mike Schinkel <mikeschinkel at newclarity.net> wrote:
> P.S. Hmm. If we need a constant, is there a reason why WP_SITEURL is not
> just set in wp-config.php based on the value of $_SERVER['HTTP_HOST']?
You also have to take into account that $_SERVER['HTTP_HOST'] does not
contain the schema, the port number, or any path part.
The path part in particular is a problem even if you try to use the various
other $_SERVER variables.
If the very first hit to a site is http://domain.com/a/b/c/d/, which part of
that is site url?
More information about the wp-hackers