• Hi,
    I’ve had a problem with wordpress in that I use blog.spam.eggs:8080 as the base url, but when inside my home network I use blog.parrot, as a setup issue causes a connection refused when trying to contact blog.spam.eggs:8080 (this is my fault, but it doesnt affect the problem other than allowing me to discover it!)
    So, basically when im on my network, its trying blog.spam.eggs:8080 when it wants blog.parrot, and this was due to the siteurl variable being strictly defined.. Perhaps I missed something somewhere but anyhow;
    I managed to get around this by editing get_settings so that when given ‘siteurl’ it would return ‘https://’.$_SERVER[‘SERVER_NAME’].’:’.$_SERVER[‘SERVER_PORT’].’/’
    But it would be nice to see this as an option to set the base url as that variable, as opposed to something static.
    Just a thought ??

Viewing 1 replies (of 1 total)
  • tjworld

    (@tjworld)

    I’ve just experienced the exact same issue, and was about to make the same change.

    Its a real problem when you’ve got multiple domain names pointing to the same site.

    My alteration also deals with SSL connections, and only uses the port when its not port 80.

    $siteurl = ($_SERVER[“HTTPS”]==’on’ ? ‘https://’ : ‘https://’).$_SERVER[“SERVER_NAME”].($_SERVER[“SERVER_PORT”] != 80 ? ‘:’.$_SERVER[“SERVER_PORT”] : ”);

Viewing 1 replies (of 1 total)
  • The topic ‘virtual hosts and siteurl’ is closed to new replies.