Skip to content
Snippets Groups Projects
Commit 29bfeabc authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Alt url

parent 55824688
Branches
Tags
No related merge requests found
...@@ -153,7 +153,8 @@ define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr' ...@@ -153,7 +153,8 @@ define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr'
// Define DOL_MAIN_URL_ROOT_ALT and DOL_URL_ROOT_ALT // Define DOL_MAIN_URL_ROOT_ALT and DOL_URL_ROOT_ALT
if (! empty($dolibarr_main_url_root_alt)) if (! empty($dolibarr_main_url_root_alt))
{ {
$tmp_alt=$tmp.str_replace($dolibarr_main_url_root,'',$dolibarr_main_url_root_alt); $altpart=str_replace($dolibarr_main_url_root,'',$dolibarr_main_url_root_alt);
$tmp_alt=$tmp.(preg_match('/^\//',$altpart)?'':'/').$altpart;
define('DOL_MAIN_URL_ROOT_ALT', $tmp_alt); // URL absolute root (https://sss/dolibarr/custom, ...) define('DOL_MAIN_URL_ROOT_ALT', $tmp_alt); // URL absolute root (https://sss/dolibarr/custom, ...)
$uri=preg_replace('/^http(s?):\/\//i','',constant('DOL_MAIN_URL_ROOT_ALT')); // $uri contains url without http* $uri=preg_replace('/^http(s?):\/\//i','',constant('DOL_MAIN_URL_ROOT_ALT')); // $uri contains url without http*
$suburi = strstr($uri, '/'); // $suburi contains url without domain $suburi = strstr($uri, '/'); // $suburi contains url without domain
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment