diff --git a/htdocs/adherents/public.php b/htdocs/adherents/public.php
index 3fde848cbef45ac662d5adb009ed9cb4259f5bdb..20088ad11ece5dd7b1578891facaa37d7f6c8db0 100644
--- a/htdocs/adherents/public.php
+++ b/htdocs/adherents/public.php
@@ -48,12 +48,10 @@ print '<br>';
 print '<table class="border" cellspacing="0" cellpadding="3">';
 print '<tr class="liste_titre"><td>'.$langs->trans("Description").'</td><td>'.$langs->trans("URL").'</td></tr>';
 // Should work with DOL_URL_ROOT='' or DOL_URL_ROOT='/dolibarr'
-$firstpart=$dolibarr_main_url_root;
-$regex='/'.DOL_URL_ROOT.'$/i';
-$firstpart=preg_replace($regex,'',$firstpart);
-print '<tr><td>'.$langs->trans("BlankSubscriptionForm").'</td><td><a target="_blank" href="'.DOL_URL_ROOT.'/public/members/new.php'.'">'.$firstpart.DOL_URL_ROOT.'/public/members/new.php'.'</a></td></tr>';
-print '<tr><td>'.$langs->trans("PublicMemberList").'</td><td><a target="_blank" href="'.DOL_URL_ROOT.'/public/members/public_list.php'.'">'.$firstpart.DOL_URL_ROOT.'/public/members/public_list.php'.'</a></td></tr>';
-print '<tr><td>'.$langs->trans("PublicMemberCard").'</td><td>'.$firstpart.DOL_URL_ROOT.'/public/members/public_card.php?id=xxx'.'</td></tr>';
+$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$dolibarr_main_url_root);
+print '<tr><td>'.$langs->trans("BlankSubscriptionForm").'</td><td><a target="_blank" href="'.DOL_URL_ROOT.'/public/members/new.php'.'">'.$urlwithouturlroot.DOL_URL_ROOT.'/public/members/new.php'.'</a></td></tr>';
+print '<tr><td>'.$langs->trans("PublicMemberList").'</td><td><a target="_blank" href="'.DOL_URL_ROOT.'/public/members/public_list.php'.'">'.$urlwithouturlroot.DOL_URL_ROOT.'/public/members/public_list.php'.'</a></td></tr>';
+print '<tr><td>'.$langs->trans("PublicMemberCard").'</td><td>'.$urlwithouturlroot.DOL_URL_ROOT.'/public/members/public_card.php?id=xxx'.'</td></tr>';
 print '</table>';
 
 
diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php
index 9d07c28d028a093c0e29b0d7943f69f3911f185f..4b5a914998ab621bb740af6cdecc4931263a988a 100644
--- a/htdocs/admin/index.php
+++ b/htdocs/admin/index.php
@@ -46,9 +46,6 @@ $form = new Form($db);
 
 print_fiche_titre($langs->trans("SetupArea"),'','setup');
 
-//print '<a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
-//print '<center><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" alt="Dolibarr logo"></center><br>';
-
 if ($mesg) print $mesg.'<br>';
 
 print $langs->trans("SetupDescription1").' ';
diff --git a/htdocs/admin/paybox.php b/htdocs/admin/paybox.php
index 0ca81c631a64f705b4331bd60c2bccdc2724b70e..012b7e02851e37922f63e1f6f6b2ccc37ff7d745 100644
--- a/htdocs/admin/paybox.php
+++ b/htdocs/admin/paybox.php
@@ -159,35 +159,34 @@ print '<br><br>';
 
 print '<u>'.$langs->trans("FollowingUrlAreAvailableToMakePayments").':</u><br>';
 // Should work with DOL_URL_ROOT='' or DOL_URL_ROOT='/dolibarr'
-$firstpart=$dolibarr_main_url_root;
-$firstpart=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$firstpart);
+$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$dolibarr_main_url_root);
 print '<br>';
 print img_picto('','puce.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount",$servicename).':<br>';
-print '<b>'.$firstpart.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=<i>9.99</i>&tag=<i>your_free_tag</i></b>'."<br>\n";
+print '<b>'.$urlwithouturlroot.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=<i>9.99</i>&tag=<i>your_free_tag</i></b>'."<br>\n";
 print '<br>';
 if ($conf->commande->enabled)
 {
 	print img_picto('','puce.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder",$servicename).':<br>';
-	print '<b>'.$firstpart.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=order&ref=<i>order_ref</i></b>'."<br>\n";
+	print '<b>'.$urlwithouturlroot.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=order&ref=<i>order_ref</i></b>'."<br>\n";
 	print '<br>';
 }
 if ($conf->facture->enabled)
 {
 	print img_picto('','puce.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice",$servicename).':<br>';
-	print '<b>'.$firstpart.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=invoice&ref=<i>invoice_ref</i></b>'."<br>\n";
+	print '<b>'.$urlwithouturlroot.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=invoice&ref=<i>invoice_ref</i></b>'."<br>\n";
 //	print $langs->trans("SetupPayBoxToHavePaymentCreatedAutomatically",$langs->transnoentitiesnoconv("FeatureNotYetAvailable"))."<br>\n";
 	print '<br>';
 }
 if ($conf->contrat->enabled)
 {
 	print img_picto('','puce.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine",$servicename).':<br>';
-	print '<b>'.$firstpart.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=contractline&ref=<i>contractline_ref</i></b>'."<br>\n";
+	print '<b>'.$urlwithouturlroot.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=contractline&ref=<i>contractline_ref</i></b>'."<br>\n";
 	print '<br>';
 }
 if ($conf->adherent->enabled)
 {
 	print img_picto('','puce.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription",$servicename).':<br>';
-	print '<b>'.$firstpart.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=membersubscription&ref=<i>member_ref</i></b>'."<br>\n";
+	print '<b>'.$urlwithouturlroot.DOL_URL_ROOT.'/public/paybox/newpayment.php?amount=membersubscription&ref=<i>member_ref</i></b>'."<br>\n";
 	print '<br>';
 }
 print $langs->trans("YouCanAddTagOnUrl");
diff --git a/htdocs/admin/webservices.php b/htdocs/admin/webservices.php
index c78271a344e7193412bb2c29cc08da02f9da1277..62053f821b382ad1258ff463e113b385cfeddef6 100644
--- a/htdocs/admin/webservices.php
+++ b/htdocs/admin/webservices.php
@@ -64,16 +64,15 @@ if ($mesg) print '<br>'.$mesg;
 print '<br><br>';
 
 // Should work with DOL_URL_ROOT='' or DOL_URL_ROOT='/dolibarr'
-$firstpart=$dolibarr_main_url_root;
-$firstpart=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$firstpart);
+$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',$dolibarr_main_url_root);
 
 print '<u>'.$langs->trans("WSDLCanBeDownloadedHere").':</u><br>';
-$url=$firstpart.DOL_URL_ROOT.'/webservices/server.php?wsdl';
+$url=$urlwithouturlroot.DOL_URL_ROOT.'/webservices/server.php?wsdl';
 print img_picto('','puce.png').' '.'<a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
 print '<br>';
 
 print '<u>'.$langs->trans("EndPointIs").':</u><br>';
-$url=$firstpart.DOL_URL_ROOT.'/webservices/server.php';
+$url=$urlwithouturlroot.DOL_URL_ROOT.'/webservices/server.php';
 print img_picto('','puce.png').' '.'<a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
 print '<br>';