Ready to get started?Download WordPress


WordPress MU Domain Mapping
plugin modifies HTTPS server var which interferes with other p (2 posts)

  1. Frett
    Posted 2 years ago #

    I've run into an issue where using the Domain Mapping plugin and the Net_URL2 pear package [1] which causes Net_URL2::getRequested to always return an https url.

    When the domain mapping plugin is running and generating a mapped url it changes the value of $_SERVER['HTTPS'] to 'off' when it wasn't set, this causes logic that is just looking for 'HTTPS' being set to return true even when the request was actually http.

    The documentation[2] for the variable states it should be "Set to a non-empty value if the script was queried through the HTTPS protocol." There is a caveat that IIS sets it to off when it's not an HTTPS request, but that caveat was addressed with this bug report[3]

    There is no real reason for the domain mapping plugin to actually have to change the state of the variable, here is a patch[4] that updates the plugin to just examine the state of the variable and not update it's value.

    [1] http://pear.php.net/package/Net_URL2/
    [2] http://us2.php.net/manual/en/reserved.variables.server.php
    [3] https://bugs.php.net/bug.php?id=55403
    [4] https://github.com/frett/wordpress-mu-domain-mapping/compare/master...httpsVar


  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    I'm not the person who coded that but I suspect it was probably for IIS support.

    Thanks for letting us know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.