function hikashop_currentURL($checkInRequest='',$safe=true){
if(!empty($checkInRequest)){
$url = JRequest::getVar($checkInRequest,'');
if(!empty($url)){
if(strpos($url,'http')!==0&&strpos($url,'/')!==0){
if($checkInRequest=='return_url'){
$url = base64_decode(urldecode($url));
}elseif($checkInRequest=='url'){
$url = urldecode($url);
}
}
if($safe){
$url = str_replace(array('"',"'",'<','>',';'),array('%22','%27','%3C','%3E','%3B'),$url);
}
return $url;
}
}
$config = hikashop_config();
/**
* 0 -> auto detect
* REQUEST_URI
* REDIRECT_URL
*/
//echo "<pre>".print_r($_SERVER,true).'</pre>';
$requestUri = $_SERVER["REQUEST_URI"];
if (!empty($_SERVER["REDIRECT_URL"]) && !empty($_SERVER['REDIRECT_QUERY_STRING'])) $requestUri = rtrim($requestUri,'/').'?'.$_SERVER['REDIRECT_QUERY_STRING'];
$result = (hikashop_isSSL() ? 'https://' : 'http://').$_SERVER["HTTP_HOST"].$requestUri;
if($safe){
$result = str_replace(array('"',"'",'<','>',';'),array('%22','%27','%3C','%3E','%3B'),$result);
}
return $result;
}
As Jerome said, the fact that your web server works like that is not normal. The proper solution would be to fix your server.