diff --git a/htdocs/main.inc.php3 b/htdocs/main.inc.php3 index 890e4358931..db0c77850d9 100644 --- a/htdocs/main.inc.php3 +++ b/htdocs/main.inc.php3 @@ -26,9 +26,20 @@ if (! include ("conf/conf.php")) exit ; } - define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); -define('DOL_URL_ROOT', $dolibarr_main_url_root); + +/* On traitera plus tard le https */ +if (strtolower(substr($dolibarr_main_url_root, 0, 7)) == 'http://') +{ + $uri = substr($dolibarr_main_url_root, 7); +} +if (strtolower(substr($dolibarr_main_url_root, 0, 7)) == 'https:/') +{ + $uri = substr($dolibarr_main_url_root, 8); +} + +$pos = substr(strstr ($uri, '/'), 1); +define('DOL_URL_ROOT', $pos); require (DOL_DOCUMENT_ROOT."/conf/conf.class.php3"); /* @@ -243,7 +254,7 @@ function top_menu($head) // print "
"; print $head; // print ''; - print ''; + print ''; print "\n"; if (defined("MAIN_TITLE")) {