Comment 0 for bug 1057018

Revision history for this message
Uranium235 (uranium235) wrote :

Even though the root directory and https issues have been fixed/addressed in the development branch, windows servers will still not function properly as dirname() return a backslash instead of a forward slash for the document root.

fix:

$protocol = 'http';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && $_SERVER['HTTPS'] != 'off')
 $protocol .= 's';
$directory = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
define('SITE_URL', $protocol.'://'.$_SERVER['HTTP_HOST'].$directory);