1). ow_utilities/url.php
Change existing public static function self(Url() with:
public static function selfUrl()
{
$s = (!empty($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on") ) ? 's' : '';
$serverProtocol = strtolower($_SERVER["SERVER_PROTOCOL"]);
$protocol = substr($serverProtocol, 0, strpos($serverProtocol, '/')) . $s;
$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":" . $_SERVER["SERVER_PORT"]);
//This mod is to add back https to url
if ($_SERVER["HTTPS"] == "on")
{
return '' . $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
} else
{
return $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
}
}
2). ow_core/application.php
Change existing public function redirect( $redirectTo = null ) with:
public function redirect( $redirectTo = null )
{
// if empty redirect location -> current URI is used
if ( $redirectTo === null )
{
$redirectTo = OW::getRequest()->getRequestUri();
}
// if URI is provided need to add site home URL
// my mod change '" to 'http'
if ( !strstr($redirectTo, 'http') )
{
$redirectTo = OW_URL_HOME . UTIL_String::removeFirstAndLastSlashes($redirectTo);
}
UTIL_Url::redirect($redirectTo);
}
Regards,
Lloyd