diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php
index c972930c66..4779559811 100644
--- a/lib/base/front/front.class.php
+++ b/lib/base/front/front.class.php
@@ -492,11 +492,13 @@ class baseHTML
global $lang, $app, $config;
if(empty($label)) $label = $lang->goback;
- $tab = $_COOKIE['tab'];
- $referer = isset($_SERVER['HTTP_REFERER']) ? strtolower($_SERVER['HTTP_REFERER']) : '';
- $refererParts = parse_url($referer);
+ $gobackLink = "{$label}";
+ $tab = $_COOKIE['tab'];
+ $referer = isset($_SERVER['HTTP_REFERER']) ? strtolower($_SERVER['HTTP_REFERER']) : '';
+ $refererParts = parse_url($referer);
- if(empty($refererParts) or !isset($refererParts['query'])) return "{$label}";
+ if($config->requestType == 'PATH_INFO' and empty($refererParts)) return $gobackLink;
+ if($config->requestType == 'GET' and !isset($refererParts['query'])) return $gobackLink;
$refererLink = $config->requestType == 'PATH_INFO' ? $refererParts['path'] : $refererParts['query'];
$currentModule = $app->getModuleName();