diff --git a/apps/maarch_entreprise/js/functions.js b/apps/maarch_entreprise/js/functions.js
index 1e6b23912bac83dbe0524586c04067630fbe2f2e..1166237693709b9aee6c20a8e877aace62acfdf3 100755
--- a/apps/maarch_entreprise/js/functions.js
+++ b/apps/maarch_entreprise/js/functions.js
@@ -2985,7 +2985,7 @@ function loadDiffList(id)
                 onSuccess: function (answer) {
                     eval("response = " + answer.responseText);
                     if (!response.toShow.match(/<div style="font-style:italic;text-align:center;color:#ea0000;margin:10px;">/)) {
-                        $('divDiffList_' + id).innerHTML += '<fieldset style="border: 1px dashed rgb(0, 157, 197);width:100%;"><legend>Circuit de visa:</legend>' + response.toShow + '</fieldset>';
+                        $('divDiffList_' + id).innerHTML += '<fieldset id="visa_fieldset" style="border: 1px dashed rgb(0, 157, 197);width:100%;"><legend>Circuit de visa:</legend>' + response.toShow + '</fieldset>';
                         $j('#divDiffList_' + id).css({"width": "97%", "display": "table"});
                         $j('#divDiffList_' + id).children().css({"width": "48%", "display": "table-cell", "vertical-align": "top", "padding": "5px", "margin": "5px"});
                     }
@@ -3000,7 +3000,11 @@ function loadDiffList(id)
                                         $('divDiffList_' + id).innerHTML += '<fieldset style="border: 1px dashed rgb(0, 157, 197);width:100%;"><legend>Circuit d\'avis:</legend>' + response.toShow + '</fieldset>';
                                         $j('#divDiffList_' + id).css({"width": "97%", "display": "table", "white-space": "nowrap"});
                                         $j('#divDiffList_' + id+" fieldset").css({"white-space": "normal"});
-                                        $j('#divDiffList_' + id).children().css({"width": "32%", "display": "table-cell", "vertical-align": "top", "padding": "5px", "margin": "5px"});
+                                        if($j('#visa_fieldset').length){
+                                            $j('#divDiffList_' + id).children().css({"width": "32%", "display": "table-cell", "vertical-align": "top", "padding": "5px", "margin": "5px"});
+                                        }else{
+                                            $j('#divDiffList_' + id).children().css({"width": "48%", "display": "table-cell", "vertical-align": "top", "padding": "5px", "margin": "5px"});
+                                        }
                                     }
 
                                 }
diff --git a/core/class/class_core_tools.php b/core/class/class_core_tools.php
index 4380ef27c9ad3900602499efeefcde29cb3cf439..6e7d98c9eeb149a3c313b7a2de1aca534a454ab5 100755
--- a/core/class/class_core_tools.php
+++ b/core/class/class_core_tools.php
@@ -2360,6 +2360,10 @@ class core_tools extends functions
         }
         $linkToApps = false;
             $arr = explode('/', $_SERVER['SCRIPT_NAME']);
+        if($key = array_search('rest',$arr)){
+            unset($arr[$key]);
+        }
+        $arr = array_values($arr);
         for($cptArr=0;$cptArr<count($arr);$cptArr++) {
             if($arr[$cptArr] == "apps") {
                 $linkToApps = true;
diff --git a/rest/.htaccess b/rest/.htaccess
new file mode 100644
index 0000000000000000000000000000000000000000..8ece6f24b0d8631d11313b2d4293aecee84d7547
--- /dev/null
+++ b/rest/.htaccess
@@ -0,0 +1,7 @@
+Order allow,deny
+Allow from all
+RewriteEngine On
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^ index.php [QSA,L]
+