protected function removeQsVar($url, $varName) { $parts = parse_url($url); $queryParams = array(); parse_str(html_entity_decode($parts[‘query’]), $queryParams); unset($queryParams[$varName]); $queryString = http_build_query($queryParams); if(strlen($queryString)>0){ $queryString = ‘?’ . $queryString; } $url…